Bug 818816; add conditional breakpoints for the ARM macro assembler. r=mjrosenb

This commit is contained in:
Nicholas Cameron 2012-12-18 23:55:12 +13:00
Родитель 10fc13ee54
Коммит a0e8029ae0
3 изменённых файлов: 16 добавлений и 8 удалений

Просмотреть файл

@ -709,28 +709,28 @@ class DtrOffReg : public DtrOff
// These are designed to be called by a constructor of a subclass.
// Constructing the necessary RIS/RRS structures are annoying
protected:
DtrOffReg(Register rn, ShiftType type, datastore::RIS shiftImm)
: DtrOff(datastore::Reg(rn.code(), type, 0, shiftImm.encode()))
DtrOffReg(Register rn, ShiftType type, datastore::RIS shiftImm, IsUp_ iu = IsUp)
: DtrOff(datastore::Reg(rn.code(), type, 0, shiftImm.encode()), iu)
{ }
DtrOffReg(Register rn, ShiftType type, datastore::RRS shiftReg)
: DtrOff(datastore::Reg(rn.code(), type, 1, shiftReg.encode()))
DtrOffReg(Register rn, ShiftType type, datastore::RRS shiftReg, IsUp_ iu = IsUp)
: DtrOff(datastore::Reg(rn.code(), type, 1, shiftReg.encode()), iu)
{ }
};
class DtrRegImmShift : public DtrOffReg
{
public:
DtrRegImmShift(Register rn, ShiftType type, uint32_t shift)
: DtrOffReg(rn, type, datastore::RIS(shift))
DtrRegImmShift(Register rn, ShiftType type, uint32_t shift, IsUp_ iu = IsUp)
: DtrOffReg(rn, type, datastore::RIS(shift), iu)
{ }
};
class DtrRegRegShift : public DtrOffReg
{
public:
DtrRegRegShift(Register rn, ShiftType type, Register rs)
: DtrOffReg(rn, type, datastore::RRS(rs.code()))
DtrRegRegShift(Register rn, ShiftType type, Register rs, IsUp_ iu = IsUp)
: DtrOffReg(rn, type, datastore::RRS(rs.code()), iu)
{ }
};

Просмотреть файл

@ -2644,6 +2644,12 @@ MacroAssemblerARMCompat::breakpoint()
as_bkpt();
}
void
MacroAssemblerARMCompat::breakpoint(Condition cc)
{
ma_ldr(DTRAddr(r12, DtrRegImmShift(r12, LSL, 0, IsDown)), r12, Offset, cc);
}
void
MacroAssemblerARMCompat::setupABICall(uint32_t args)
{

Просмотреть файл

@ -1030,6 +1030,8 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
void setStackArg(const Register &reg, uint32_t arg);
void breakpoint();
// conditional breakpoint
void breakpoint(Condition cc);
void compareDouble(FloatRegister lhs, FloatRegister rhs);
void branchDouble(DoubleCondition cond, const FloatRegister &lhs, const FloatRegister &rhs,