From a830e63de71e5929b8ff8e334bc872faa9193a8b Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Tue, 15 Oct 2013 14:22:43 -0400 Subject: isa: clean up register constants Clean up and add some consistency to the *_Base_DepTag constants as well as some related register constants: - Get rid of NumMiscArchRegs, TotalArchRegs, and TotalDataRegs since they're never used and not always defined - Set FP_Base_DepTag = NumIntRegs when possible (i.e., every case except x86) - Set Ctrl_Base_DepTag = FP_Base_DepTag + NumFloatRegs (this was true before, but wasn't always expressed that way) - Drastically reduce the number of arbitrary constants appearing in these calculations --- src/arch/mips/registers.hh | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'src/arch/mips') diff --git a/src/arch/mips/registers.hh b/src/arch/mips/registers.hh index 807fd825f..911e09d41 100644 --- a/src/arch/mips/registers.hh +++ b/src/arch/mips/registers.hh @@ -115,15 +115,6 @@ const int ReturnAddressReg = 31; const int SyscallPseudoReturnReg = 3; -//@TODO: Implementing ShadowSets needs to -//edit this value such that: -//TotalArchRegs = NumIntArchRegs * ShadowSets -const int TotalArchRegs = NumIntArchRegs; - -// These help enumerate all the registers for dependence tracking. -const int FP_Base_DepTag = NumIntRegs; -const int Ctrl_Base_DepTag = FP_Base_DepTag + NumFloatRegs; - // Enumerate names for 'Control' Registers in the CPU // Reference MIPS32 Arch. for Programmers, Vol. III, Ch.8 // (Register Number-Register Select) Summary of Register @@ -281,9 +272,11 @@ enum MiscRegIndex{ MISCREG_NUMREGS }; -const int TotalDataRegs = NumIntRegs + NumFloatRegs; - const int NumMiscRegs = MISCREG_NUMREGS; + +// These help enumerate all the registers for dependence tracking. +const int FP_Base_DepTag = NumIntRegs; +const int Ctrl_Base_DepTag = FP_Base_DepTag + NumFloatRegs; const int Max_DepTag = Ctrl_Base_DepTag + NumMiscRegs; const int TotalNumRegs = NumIntRegs + NumFloatRegs + NumMiscRegs; -- cgit v1.2.3