namespace ArmISA
{
-class MemoryNew : public PredOp
+class Memory : public PredOp
{
public:
enum AddrMode {
IntRegIndex base;
bool add;
- MemoryNew(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
- IntRegIndex _dest, IntRegIndex _base, bool _add)
+ Memory(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
+ IntRegIndex _dest, IntRegIndex _base, bool _add)
: PredOp(mnem, _machInst, __opClass),
dest(_dest), base(_base), add(_add)
{}
};
// The address is a base register plus an immediate.
-class MemoryNewImm : public MemoryNew
+class MemoryImm : public Memory
{
protected:
int32_t imm;
- MemoryNewImm(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
- IntRegIndex _dest, IntRegIndex _base, bool _add, int32_t _imm)
- : MemoryNew(mnem, _machInst, __opClass, _dest, _base, _add), imm(_imm)
+ MemoryImm(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
+ IntRegIndex _dest, IntRegIndex _base, bool _add, int32_t _imm)
+ : Memory(mnem, _machInst, __opClass, _dest, _base, _add), imm(_imm)
{}
void
};
// The address is a shifted register plus an immediate
-class MemoryNewReg : public MemoryNew
+class MemoryReg : public Memory
{
protected:
int32_t shiftAmt;
ArmShiftType shiftType;
IntRegIndex index;
- MemoryNewReg(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
- IntRegIndex _dest, IntRegIndex _base, bool _add,
- int32_t _shiftAmt, ArmShiftType _shiftType,
- IntRegIndex _index)
- : MemoryNew(mnem, _machInst, __opClass, _dest, _base, _add),
+ MemoryReg(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
+ IntRegIndex _dest, IntRegIndex _base, bool _add,
+ int32_t _shiftAmt, ArmShiftType _shiftType,
+ IntRegIndex _index)
+ : Memory(mnem, _machInst, __opClass, _dest, _base, _add),
shiftAmt(_shiftAmt), shiftType(_shiftType), index(_index)
{}
};
template<class Base>
-class MemoryNewOffset : public Base
+class MemoryOffset : public Base
{
protected:
- MemoryNewOffset(const char *mnem, ExtMachInst _machInst,
- OpClass __opClass, IntRegIndex _dest, IntRegIndex _base,
- bool _add, int32_t _imm)
+ MemoryOffset(const char *mnem, ExtMachInst _machInst,
+ OpClass __opClass, IntRegIndex _dest, IntRegIndex _base,
+ bool _add, int32_t _imm)
: Base(mnem, _machInst, __opClass, _dest, _base, _add, _imm)
{}
- MemoryNewOffset(const char *mnem, ExtMachInst _machInst,
- OpClass __opClass, IntRegIndex _dest, IntRegIndex _base,
- bool _add, int32_t _shiftAmt, ArmShiftType _shiftType,
- IntRegIndex _index)
+ MemoryOffset(const char *mnem, ExtMachInst _machInst,
+ OpClass __opClass, IntRegIndex _dest, IntRegIndex _base,
+ bool _add, int32_t _shiftAmt, ArmShiftType _shiftType,
+ IntRegIndex _index)
: Base(mnem, _machInst, __opClass, _dest, _base, _add,
_shiftAmt, _shiftType, _index)
{}
generateDisassembly(Addr pc, const SymbolTable *symtab) const
{
std::stringstream ss;
- this->printInst(ss, MemoryNew::AddrMd_Offset);
+ this->printInst(ss, Memory::AddrMd_Offset);
return ss.str();
}
};
template<class Base>
-class MemoryNewPreIndex : public Base
+class MemoryPreIndex : public Base
{
protected:
- MemoryNewPreIndex(const char *mnem, ExtMachInst _machInst,
- OpClass __opClass, IntRegIndex _dest, IntRegIndex _base,
- bool _add, int32_t _imm)
+ MemoryPreIndex(const char *mnem, ExtMachInst _machInst,
+ OpClass __opClass, IntRegIndex _dest, IntRegIndex _base,
+ bool _add, int32_t _imm)
: Base(mnem, _machInst, __opClass, _dest, _base, _add, _imm)
{}
- MemoryNewPreIndex(const char *mnem, ExtMachInst _machInst,
- OpClass __opClass, IntRegIndex _dest, IntRegIndex _base,
- bool _add, int32_t _shiftAmt, ArmShiftType _shiftType,
- IntRegIndex _index)
+ MemoryPreIndex(const char *mnem, ExtMachInst _machInst,
+ OpClass __opClass, IntRegIndex _dest, IntRegIndex _base,
+ bool _add, int32_t _shiftAmt, ArmShiftType _shiftType,
+ IntRegIndex _index)
: Base(mnem, _machInst, __opClass, _dest, _base, _add,
_shiftAmt, _shiftType, _index)
{}
generateDisassembly(Addr pc, const SymbolTable *symtab) const
{
std::stringstream ss;
- this->printInst(ss, MemoryNew::AddrMd_PreIndex);
+ this->printInst(ss, Memory::AddrMd_PreIndex);
return ss.str();
}
};
template<class Base>
-class MemoryNewPostIndex : public Base
+class MemoryPostIndex : public Base
{
protected:
- MemoryNewPostIndex(const char *mnem, ExtMachInst _machInst,
- OpClass __opClass, IntRegIndex _dest, IntRegIndex _base,
- bool _add, int32_t _imm)
+ MemoryPostIndex(const char *mnem, ExtMachInst _machInst,
+ OpClass __opClass, IntRegIndex _dest, IntRegIndex _base,
+ bool _add, int32_t _imm)
: Base(mnem, _machInst, __opClass, _dest, _base, _add, _imm)
{}
- MemoryNewPostIndex(const char *mnem, ExtMachInst _machInst,
- OpClass __opClass, IntRegIndex _dest, IntRegIndex _base,
- bool _add, int32_t _shiftAmt, ArmShiftType _shiftType,
- IntRegIndex _index)
+ MemoryPostIndex(const char *mnem, ExtMachInst _machInst,
+ OpClass __opClass, IntRegIndex _dest, IntRegIndex _base,
+ bool _add, int32_t _shiftAmt, ArmShiftType _shiftType,
+ IntRegIndex _index)
: Base(mnem, _machInst, __opClass, _dest, _base, _add,
_shiftAmt, _shiftType, _index)
{}
generateDisassembly(Addr pc, const SymbolTable *symtab) const
{
std::stringstream ss;
- this->printInst(ss, MemoryNew::AddrMd_PostIndex);
+ this->printInst(ss, Memory::AddrMd_PostIndex);
return ss.str();
}
};
(newHeader,
newDecoder,
- newExec) = newLoadStoreBase(name, Name, imm,
- eaCode, accCode,
- memFlags, instFlags,
- base, execTemplateBase = 'Load')
+ newExec) = loadStoreBase(name, Name, imm,
+ eaCode, accCode,
+ memFlags, instFlags,
+ base, execTemplateBase = 'Load')
header_output += newHeader
decoder_output += newDecoder
accCode = "Dest = Mem%s;\n" % buildMemSuffix(sign, size)
if writeback:
accCode += "Base = Base %s;\n" % offset
- base = buildMemBase("MemoryNewImm", post, writeback)
+ base = buildMemBase("MemoryImm", post, writeback)
emitLoad(name, Name, True, eaCode, accCode, [], [], base)
accCode = "Dest = Mem%s;\n" % buildMemSuffix(sign, size)
if writeback:
accCode += "Base = Base %s;\n" % offset
- base = buildMemBase("MemoryNewReg", post, writeback)
+ base = buildMemBase("MemoryReg", post, writeback)
emitLoad(name, Name, False, eaCode, accCode, [], [], base)
'''
if writeback:
accCode += "Base = Base %s;\n" % offset
- base = buildMemBase("MemoryNewImm", post, writeback)
+ base = buildMemBase("MemoryImm", post, writeback)
emitLoad(name, Name, True, eaCode, accCode, [], [], base)
'''
if writeback:
accCode += "Base = Base %s;\n" % offset
- base = buildMemBase("MemoryNewReg", post, writeback)
+ base = buildMemBase("MemoryReg", post, writeback)
emitLoad(name, Name, False, eaCode, accCode, [], [], base)
(newHeader,
newDecoder,
- newExec) = newLoadStoreBase(name, Name, imm,
- eaCode, accCode,
- memFlags, instFlags,
- base, execTemplateBase = 'Store')
+ newExec) = loadStoreBase(name, Name, imm,
+ eaCode, accCode,
+ memFlags, instFlags,
+ base, execTemplateBase = 'Store')
header_output += newHeader
decoder_output += newDecoder
accCode = "Mem%s = Dest;\n" % buildMemSuffix(sign, size)
if writeback:
accCode += "Base = Base %s;\n" % offset
- base = buildMemBase("MemoryNewImm", post, writeback)
+ base = buildMemBase("MemoryImm", post, writeback)
emitStore(name, Name, True, eaCode, accCode, [], [], base)
accCode = "Mem%s = Dest;\n" % buildMemSuffix(sign, size)
if writeback:
accCode += "Base = Base %s;\n" % offset
- base = buildMemBase("MemoryNewReg", post, writeback)
+ base = buildMemBase("MemoryReg", post, writeback)
emitStore(name, Name, False, eaCode, accCode, [], [], base)
accCode = 'Mem.ud = (Rdo.ud & mask(32)) | (Rde.ud << 32);'
if writeback:
accCode += "Base = Base %s;\n" % offset
- base = buildMemBase("MemoryNewImm", post, writeback)
+ base = buildMemBase("MemoryImm", post, writeback)
emitStore(name, Name, True, eaCode, accCode, [], [], base)
accCode = 'Mem.ud = (Rdo.ud & mask(32)) | (Rde.ud << 32);'
if writeback:
accCode += "Base = Base %s;\n" % offset
- base = buildMemBase("MemoryNewReg", post, writeback)
+ base = buildMemBase("MemoryReg", post, writeback)
emitStore(name, Name, False, eaCode, accCode, [], [], base)