summaryrefslogtreecommitdiff
path: root/src/arch/x86/intregs.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/intregs.hh')
-rw-r--r--src/arch/x86/intregs.hh31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/arch/x86/intregs.hh b/src/arch/x86/intregs.hh
index bfec7d041..6f252392e 100644
--- a/src/arch/x86/intregs.hh
+++ b/src/arch/x86/intregs.hh
@@ -58,16 +58,22 @@
#ifndef __ARCH_X86_INTREGS_HH__
#define __ARCH_X86_INTREGS_HH__
+#include "arch/x86/x86_traits.hh"
#include "base/bitunion.hh"
namespace X86ISA
{
BitUnion64(X86IntReg)
Bitfield<63,0> R;
+ SignedBitfield<63,0> SR;
Bitfield<31,0> E;
+ SignedBitfield<31,0> SE;
Bitfield<15,0> X;
+ SignedBitfield<15,0> SX;
Bitfield<15,8> H;
+ SignedBitfield<15,8> SH;
Bitfield<7, 0> L;
+ SignedBitfield<7, 0> SL;
EndBitUnion(X86IntReg)
enum IntRegIndex
@@ -158,6 +164,31 @@ namespace X86ISA
NUM_INTREGS
};
+
+ inline static IntRegIndex
+ INTREG_MICRO(int index)
+ {
+ return (IntRegIndex)(NUM_INTREGS + index);
+ }
+
+ inline static IntRegIndex
+ INTREG_PSEUDO(int index)
+ {
+ return (IntRegIndex)(NUM_INTREGS + NumMicroIntRegs + index);
+ }
+
+ inline static IntRegIndex
+ INTREG_IMPLICIT(int index)
+ {
+ return (IntRegIndex)(NUM_INTREGS + NumMicroIntRegs +
+ NumPseudoIntRegs + index);
+ }
+
+ inline static IntRegIndex
+ INTREG_FOLDED(int index, int foldBit)
+ {
+ return (IntRegIndex)(((index & 0x1C) == 4 ? foldBit : 0) | index);
+ }
};
#endif // __ARCH_X86_INTREGS_HH__