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:51:13 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-06-21 22:51:13 -0700
commitd744525273ee4e30c68174afbe3f4c3630956ca8 (patch)
treef69789950621d89e5bf56aef8d18640a7fcbdc0a /src/arch/arm/insts/static_inst.hh
parent5c2a362cb79d9aaf5fc69cf05a56d67d98f8b737 (diff)
downloadgem5-d744525273ee4e30c68174afbe3f4c3630956ca8.tar.xz
ARM: Simplify some utility functions.
Diffstat (limited to 'src/arch/arm/insts/static_inst.hh')
-rw-r--r--src/arch/arm/insts/static_inst.hh42
1 files changed, 12 insertions, 30 deletions
diff --git a/src/arch/arm/insts/static_inst.hh b/src/arch/arm/insts/static_inst.hh
index 9ee166ecb..6321f0de9 100644
--- a/src/arch/arm/insts/static_inst.hh
+++ b/src/arch/arm/insts/static_inst.hh
@@ -37,39 +37,21 @@ namespace ArmISA
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;
+ int32_t shift_rm_imm(uint32_t base, uint32_t shamt,
+ uint32_t type, uint32_t cfval) const;
+ int32_t shift_rm_rs(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;
+ bool shift_carry_imm(uint32_t base, uint32_t shamt,
+ uint32_t type, uint32_t cfval) const;
+ bool shift_carry_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;
+ bool arm_add_carry(int32_t result, int32_t lhs, int32_t rhs) const;
+ bool arm_sub_carry(int32_t result, int32_t lhs, int32_t rhs) 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;
-
- // 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;
+ bool arm_add_overflow(int32_t result, int32_t lhs, int32_t rhs) const;
+ bool arm_sub_overflow(int32_t result, int32_t lhs, int32_t rhs) const;
// Constructor
ArmStaticInst(const char *mnem, MachInst _machInst, OpClass __opClass)