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/alpha/registers.hh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/arch/alpha/registers.hh') diff --git a/src/arch/alpha/registers.hh b/src/arch/alpha/registers.hh index e1f50ddc2..6f0b02c7f 100644 --- a/src/arch/alpha/registers.hh +++ b/src/arch/alpha/registers.hh @@ -88,23 +88,20 @@ const RegIndex SyscallSuccessReg = 19; const int NumIntArchRegs = 32; const int NumPALShadowRegs = 8; const int NumFloatArchRegs = 32; -const int NumMiscArchRegs = NUM_MISCREGS; const int NumIntRegs = NumIntArchRegs + NumPALShadowRegs; const int NumFloatRegs = NumFloatArchRegs; -const int NumMiscRegs = NumMiscArchRegs; +const int NumMiscRegs = NUM_MISCREGS; const int TotalNumRegs = NumIntRegs + NumFloatRegs + NumMiscRegs; -const int TotalDataRegs = NumIntRegs + NumFloatRegs; - // These enumerate all the registers for dependence tracking. enum DependenceTags { // 0..31 are the integer regs 0..31 // 32..63 are the FP regs 0..31, i.e. use (reg + FP_Base_DepTag) - FP_Base_DepTag = 40, - Ctrl_Base_DepTag = 72, + FP_Base_DepTag = NumIntRegs, + Ctrl_Base_DepTag = FP_Base_DepTag + NumFloatRegs, Max_DepTag = Ctrl_Base_DepTag + NumMiscRegs + NumInternalProcRegs }; -- cgit v1.2.3