summaryrefslogtreecommitdiff
path: root/src/arch/x86/registers.hh
diff options
context:
space:
mode:
authorYasuko Eckert <yasuko.eckert@amd.com>2013-10-15 14:22:44 -0400
committerYasuko Eckert <yasuko.eckert@amd.com>2013-10-15 14:22:44 -0400
commit1bb293d1e7a27e306ca584a3922f2fd13481e248 (patch)
tree21d457f5c7d7e2e836eaf944b7d82964fc64d1bd /src/arch/x86/registers.hh
parent2c293823aa7cb6d2cac4c0ff35e2023ff132a8f2 (diff)
downloadgem5-1bb293d1e7a27e306ca584a3922f2fd13481e248.tar.xz
arch/x86: add support for explicit CC register file
Convert condition code registers from being specialized ("pseudo") integer registers to using the recently added CC register class. Nilay Vaish also contributed to this patch.
Diffstat (limited to 'src/arch/x86/registers.hh')
-rw-r--r--src/arch/x86/registers.hh12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/arch/x86/registers.hh b/src/arch/x86/registers.hh
index d62992dcd..ebd88136e 100644
--- a/src/arch/x86/registers.hh
+++ b/src/arch/x86/registers.hh
@@ -43,6 +43,7 @@
#include "arch/x86/generated/max_inst_regs.hh"
#include "arch/x86/regs/int.hh"
+#include "arch/x86/regs/ccr.hh"
#include "arch/x86/regs/misc.hh"
#include "arch/x86/x86_traits.hh"
@@ -54,10 +55,10 @@ using X86ISAInst::MaxMiscDestRegs;
const int NumMiscRegs = NUM_MISCREGS;
const int NumIntArchRegs = NUM_INTREGS;
-const int NumIntRegs =
- NumIntArchRegs + NumMicroIntRegs +
- NumPseudoIntRegs + NumImplicitIntRegs;
-const int NumCCRegs = 0;
+const int NumIntRegs = NumIntArchRegs + NumMicroIntRegs + NumImplicitIntRegs;
+const int NumCCRegs = NUM_CCREGS;
+
+#define ISA_HAS_CC_REGS
// Each 128 bit xmm register is broken into two effective 64 bit registers.
// Add 8 for the indices that are mapped over the fp stack
@@ -71,7 +72,7 @@ enum DependenceTags {
// we just start at (1 << 7) == 128.
FP_Reg_Base = 128,
CC_Reg_Base = FP_Reg_Base + NumFloatRegs,
- Misc_Reg_Base = CC_Reg_Base + NumCCRegs, // NumCCRegs == 0
+ Misc_Reg_Base = CC_Reg_Base + NumCCRegs,
Max_Reg_Index = Misc_Reg_Base + NumMiscRegs
};
@@ -102,6 +103,7 @@ typedef union
{
IntReg intReg;
FloatReg fpReg;
+ CCReg ccReg;
MiscReg ctrlReg;
} AnyReg;