From d4a03f19009b9a537d99d54620784d441f9c3a92 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sun, 21 Jun 2009 17:21:25 -0700 Subject: ARM: Simplify the ISA desc by pulling some classes out of it. --- src/arch/arm/isa/formats/mem.isa | 86 ---------------------------------------- 1 file changed, 86 deletions(-) (limited to 'src/arch/arm/isa/formats/mem.isa') diff --git a/src/arch/arm/isa/formats/mem.isa b/src/arch/arm/isa/formats/mem.isa index 47381add6..c8ac19c61 100644 --- a/src/arch/arm/isa/formats/mem.isa +++ b/src/arch/arm/isa/formats/mem.isa @@ -33,92 +33,6 @@ // Memory-format instructions // -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); - } -}}; - def template LoadStoreDeclare {{ /** * Static instruction class for "%(mnemonic)s". -- cgit v1.2.3