36,121d35
< output header {{
< /**
< * Base class for general Arm memory-format instructions.
< */
< class Memory : public PredOp
< {
< protected:
<
< /// Memory request flags. See mem_req_base.hh.
< unsigned memAccessFlags;
< /// Pointer to EAComp object.
< const StaticInstPtr eaCompPtr;
< /// Pointer to MemAcc object.
< const StaticInstPtr memAccPtr;
<
< /// Displacement for EA calculation (signed).
< int32_t disp;
< int32_t disp8;
< int32_t up;
< int32_t hilo,
< shift_size,
< shift;
<
< /// Constructor
< Memory(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
< StaticInstPtr _eaCompPtr = nullStaticInstPtr,
< StaticInstPtr _memAccPtr = nullStaticInstPtr)
< : PredOp(mnem, _machInst, __opClass),
< memAccessFlags(0), eaCompPtr(_eaCompPtr), memAccPtr(_memAccPtr),
< disp(IMMED_11_0), disp8(IMMED_7_0 << 2), up(UP),
< hilo((IMMED_HI_11_8 << 4) | IMMED_LO_3_0),
< shift_size(SHIFT_SIZE), shift(SHIFT)
< {
< // When Up is not set, then we must subtract by the displacement
< if (!up)
< {
< disp = -disp;
< disp8 = -disp8;
< hilo = -hilo;
< }
< }
<
< std::string
< generateDisassembly(Addr pc, const SymbolTable *symtab) const;
<
< public:
<
< const StaticInstPtr &eaCompInst() const { return eaCompPtr; }
< const StaticInstPtr &memAccInst() const { return memAccPtr; }
< };
<
< /**
< * Base class for a few miscellaneous memory-format insts
< * that don't interpret the disp field
< */
< class MemoryNoDisp : public Memory
< {
< protected:
< /// Constructor
< MemoryNoDisp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
< StaticInstPtr _eaCompPtr = nullStaticInstPtr,
< StaticInstPtr _memAccPtr = nullStaticInstPtr)
< : Memory(mnem, _machInst, __opClass, _eaCompPtr, _memAccPtr)
< {
< }
<
< std::string
< generateDisassembly(Addr pc, const SymbolTable *symtab) const;
< };
< }};
<
<
< output decoder {{
< std::string
< Memory::generateDisassembly(Addr pc, const SymbolTable *symtab) const
< {
< return csprintf("%-10s", mnemonic);
< }
<
< std::string
< MemoryNoDisp::generateDisassembly(Addr pc, const SymbolTable *symtab) const
< {
< return csprintf("%-10s", mnemonic);
< }
< }};
<