summaryrefslogtreecommitdiff
path: root/src/arch/arm/insts/static_inst.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-06-21 22:50:33 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-06-21 22:50:33 -0700
commit5c2a362cb79d9aaf5fc69cf05a56d67d98f8b737 (patch)
tree085101581ed71b5b3d96ce3887efdbff084e1e35 /src/arch/arm/insts/static_inst.hh
parentd4a03f19009b9a537d99d54620784d441f9c3a92 (diff)
downloadgem5-5c2a362cb79d9aaf5fc69cf05a56d67d98f8b737.tar.xz
ARM: Move util functions out of the isa desc.
Diffstat (limited to 'src/arch/arm/insts/static_inst.hh')
-rw-r--r--src/arch/arm/insts/static_inst.hh59
1 files changed, 46 insertions, 13 deletions
diff --git a/src/arch/arm/insts/static_inst.hh b/src/arch/arm/insts/static_inst.hh
index 5c88657b8..9ee166ecb 100644
--- a/src/arch/arm/insts/static_inst.hh
+++ b/src/arch/arm/insts/static_inst.hh
@@ -34,22 +34,55 @@
namespace ArmISA
{
- class ArmStaticInst : public StaticInst
- {
- protected:
+class ArmStaticInst : public StaticInst
+{
+ protected:
+ // Shift Rm by an immediate value
+ int32_t
+ shift_rm_imm(uint32_t base, uint32_t shamt,
+ uint32_t type, uint32_t cfval) const;
+
+ // Shift Rm by Rs
+ int32_t
+ shift_rm_rs(uint32_t base, uint32_t shamt,
+ uint32_t type, uint32_t cfval) const;
+
+ // Generate C for a shift by immediate
+ int32_t
+ shift_carry_imm(uint32_t base, uint32_t shamt,
+ uint32_t type, uint32_t cfval) const;
+
+ // Generate C for a shift by Rs
+ int32_t
+ shift_carry_rs(uint32_t base, uint32_t shamt,
+ uint32_t type, uint32_t cfval) const;
- // Constructor
- ArmStaticInst(const char *mnem, MachInst _machInst, OpClass __opClass)
- : StaticInst(mnem, _machInst, __opClass)
- {
- }
+ // Generate the appropriate carry bit for an addition operation
+ int32_t
+ arm_add_carry(int32_t result, int32_t lhs, int32_t rhs) const;
+
+ // Generate the appropriate carry bit for a subtraction operation
+ int32_t
+ arm_sub_carry(int32_t result, int32_t lhs, int32_t rhs) const;
+
+ int32_t
+ arm_add_overflow(int32_t result, int32_t lhs, int32_t rhs) const;
+
+ int32_t
+ arm_sub_overflow(int32_t result, int32_t lhs, int32_t rhs) const;
+
+ // Constructor
+ ArmStaticInst(const char *mnem, MachInst _machInst, OpClass __opClass)
+ : StaticInst(mnem, _machInst, __opClass)
+ {
+ }
- /// Print a register name for disassembly given the unique
- /// dependence tag number (FP or int).
- void printReg(std::ostream &os, int reg) const;
+ /// Print a register name for disassembly given the unique
+ /// dependence tag number (FP or int).
+ void printReg(std::ostream &os, int reg) const;
- std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const;
- };
+ std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const;
+};
}
#endif //__ARCH_ARM_INSTS_STATICINST_HH__