ARM: Add new base classes for data processing instructions.
This commit is contained in:
parent
1e7b317a98
commit
c02f9cdddf
2 changed files with 53 additions and 0 deletions
|
@ -155,6 +155,53 @@ class PredIntOp : public PredOp
|
||||||
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const;
|
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class DataImmOp : public PredOp
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
IntRegIndex dest, op1;
|
||||||
|
uint32_t imm;
|
||||||
|
// Whether the carry flag should be modified if that's an option for
|
||||||
|
// this instruction.
|
||||||
|
bool rotC;
|
||||||
|
|
||||||
|
DataImmOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
|
||||||
|
IntRegIndex _dest, IntRegIndex _op1, uint32_t _imm, bool _rotC) :
|
||||||
|
PredOp(mnem, _machInst, __opClass),
|
||||||
|
dest(_dest), op1(_op1), imm(_imm), rotC(_rotC)
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
|
||||||
|
class DataRegOp : public PredOp
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
IntRegIndex dest, op1, op2;
|
||||||
|
int32_t shiftAmt;
|
||||||
|
ArmShiftType shiftType;
|
||||||
|
|
||||||
|
DataRegOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
|
||||||
|
IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2,
|
||||||
|
int32_t _shiftAmt, ArmShiftType _shiftType) :
|
||||||
|
PredOp(mnem, _machInst, __opClass),
|
||||||
|
dest(_dest), op1(_op1), op2(_op2),
|
||||||
|
shiftAmt(_shiftAmt), shiftType(_shiftType)
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
|
||||||
|
class DataRegRegOp : public PredOp
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
IntRegIndex dest, op1, op2, shift;
|
||||||
|
ArmShiftType shiftType;
|
||||||
|
|
||||||
|
DataRegRegOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
|
||||||
|
IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2,
|
||||||
|
IntRegIndex _shift, ArmShiftType _shiftType) :
|
||||||
|
PredOp(mnem, _machInst, __opClass),
|
||||||
|
dest(_dest), op1(_op1), op2(_op2), shift(_shift),
|
||||||
|
shiftType(_shiftType)
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class for predicated macro-operations.
|
* Base class for predicated macro-operations.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -76,6 +76,12 @@ def operands {{
|
||||||
maybePCRead, maybePCWrite),
|
maybePCRead, maybePCWrite),
|
||||||
'Index': ('IntReg', 'uw', 'index', 'IsInteger', 2,
|
'Index': ('IntReg', 'uw', 'index', 'IsInteger', 2,
|
||||||
maybePCRead, maybePCWrite),
|
maybePCRead, maybePCWrite),
|
||||||
|
'Op1': ('IntReg', 'uw', 'op1', 'IsInteger', 3,
|
||||||
|
maybePCRead, maybePCWrite),
|
||||||
|
'Op2': ('IntReg', 'uw', 'op2', 'IsInteger', 4,
|
||||||
|
maybePCRead, maybePCWrite),
|
||||||
|
'Shift': ('IntReg', 'uw', 'shift', 'IsInteger', 5,
|
||||||
|
maybePCRead, maybePCWrite),
|
||||||
#General Purpose Integer Reg Operands
|
#General Purpose Integer Reg Operands
|
||||||
'Rd': ('IntReg', 'uw', 'RD', 'IsInteger', 1, maybePCRead, maybePCWrite),
|
'Rd': ('IntReg', 'uw', 'RD', 'IsInteger', 1, maybePCRead, maybePCWrite),
|
||||||
'Rm': ('IntReg', 'uw', 'RM', 'IsInteger', 2, maybePCRead, maybePCWrite),
|
'Rm': ('IntReg', 'uw', 'RM', 'IsInteger', 2, maybePCRead, maybePCWrite),
|
||||||
|
|
Loading…
Reference in a new issue