summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/arch/x86/intregfile.hh5
-rw-r--r--src/arch/x86/intregs.hh3
2 files changed, 5 insertions, 3 deletions
diff --git a/src/arch/x86/intregfile.hh b/src/arch/x86/intregfile.hh
index da631d444..f7b03f0f0 100644
--- a/src/arch/x86/intregfile.hh
+++ b/src/arch/x86/intregfile.hh
@@ -88,8 +88,9 @@
#ifndef __ARCH_X86_INTREGFILE_HH__
#define __ARCH_X86_INTREGFILE_HH__
-#include "arch/x86/x86_traits.hh"
+#include "arch/x86/intregs.hh"
#include "arch/x86/types.hh"
+#include "arch/x86/x86_traits.hh"
#include <string>
@@ -102,7 +103,7 @@ namespace X86ISA
//This function translates integer register file indices into names
std::string getIntRegName(RegIndex);
- const int NumIntArchRegs = 16;
+ const int NumIntArchRegs = NUM_INTREGS;
const int NumIntRegs = NumIntArchRegs + NumMicroIntRegs;
class IntRegFile
diff --git a/src/arch/x86/intregs.hh b/src/arch/x86/intregs.hh
index 3fe25bd5f..ed801cc48 100644
--- a/src/arch/x86/intregs.hh
+++ b/src/arch/x86/intregs.hh
@@ -77,7 +77,8 @@ namespace X86ISA
INTREG_R12W,
INTREG_R13W,
INTREG_R14W,
- INTREG_R15W
+ INTREG_R15W,
+ NUM_INTREGS
};
};