summaryrefslogtreecommitdiff
path: root/src/arch/arm/registers.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-11-08 00:07:35 -0800
committerGabe Black <gblack@eecs.umich.edu>2009-11-08 00:07:35 -0800
commit4a454c4f47362bd6f842fe1919f959a672ab1bb4 (patch)
tree23475b3ae66ce71d8d115b97230b62c3e3b9ea0a /src/arch/arm/registers.hh
parent18b21c1ecaf7858c592c56cf4c12ec8781f821ba (diff)
downloadgem5-4a454c4f47362bd6f842fe1919f959a672ab1bb4.tar.xz
ARM: Set up an intregs.hh for ARM.
Add constants for all the modes and registers, maps for aliasing, functions that use the maps and range check, and use a named constant instead of a magic number for the microcode register.
Diffstat (limited to 'src/arch/arm/registers.hh')
-rw-r--r--src/arch/arm/registers.hh14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/arch/arm/registers.hh b/src/arch/arm/registers.hh
index 07af32c1e..04fd00f3a 100644
--- a/src/arch/arm/registers.hh
+++ b/src/arch/arm/registers.hh
@@ -32,6 +32,7 @@
#define __ARCH_ARM_REGISTERS_HH__
#include "arch/arm/max_inst_regs.hh"
+#include "arch/arm/intregs.hh"
#include "arch/arm/miscregs.hh"
namespace ArmISA {
@@ -51,13 +52,12 @@ typedef float FloatReg;
typedef uint64_t MiscReg;
// Constants Related to the number of registers
-const int NumIntArchRegs = 16;
-const int NumIntSpecialRegs = 19;
+const int NumIntArchRegs = NUM_ARCH_INTREGS;
const int NumFloatArchRegs = 16;
const int NumFloatSpecialRegs = 5;
const int NumInternalProcRegs = 0;
-const int NumIntRegs = NumIntArchRegs + NumIntSpecialRegs;
+const int NumIntRegs = NUM_INTREGS;
const int NumFloatRegs = NumFloatArchRegs + NumFloatSpecialRegs;
const int NumMiscRegs = NUM_MISCREGS;
@@ -72,11 +72,11 @@ const int ArgumentReg1 = 1;
const int ArgumentReg2 = 2;
const int ArgumentReg3 = 3;
const int FramePointerReg = 11;
-const int StackPointerReg = 13;
-const int ReturnAddressReg = 14;
-const int PCReg = 15;
+const int StackPointerReg = INTREG_SP;
+const int ReturnAddressReg = INTREG_LR;
+const int PCReg = INTREG_PC;
-const int ZeroReg = NumIntArchRegs;
+const int ZeroReg = INTREG_ZERO;
const int SyscallNumReg = ReturnValueReg;
const int SyscallPseudoReturnReg = ReturnValueReg;