From ec4cd00b1101d7436ff2019dfc9fc1c09442c9c9 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 2 Jun 2010 12:58:10 -0500 Subject: ARM: Add a base class for the RFE instruction. --- src/arch/arm/insts/mem.hh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/arch/arm/insts/mem.hh') diff --git a/src/arch/arm/insts/mem.hh b/src/arch/arm/insts/mem.hh index dc4b7d627..d5b5d3519 100644 --- a/src/arch/arm/insts/mem.hh +++ b/src/arch/arm/insts/mem.hh @@ -63,6 +63,30 @@ class Swap : public PredOp std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const; }; +// The address is a base register plus an immediate. +class RfeOp : public PredOp +{ + public: + enum AddrMode { + DecrementAfter, + DecrementBefore, + IncrementAfter, + IncrementBefore + }; + protected: + IntRegIndex base; + AddrMode mode; + bool wb; + + RfeOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, + IntRegIndex _base, AddrMode _mode, bool _wb) + : PredOp(mnem, _machInst, __opClass), + base(_base), mode(_mode), wb(_wb) + {} + + std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const; +}; + class Memory : public PredOp { public: -- cgit v1.2.3