From 4a454c4f47362bd6f842fe1919f959a672ab1bb4 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sun, 8 Nov 2009 00:07:35 -0800 Subject: 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. --- src/arch/arm/registers.hh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/arch/arm/registers.hh') 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; -- cgit v1.2.3