diff options
author | Derek Hower <drh5@cs.wisc.edu> | 2009-07-18 17:40:20 -0500 |
---|---|---|
committer | Derek Hower <drh5@cs.wisc.edu> | 2009-07-18 17:40:20 -0500 |
commit | 926ab6e6dbc2417f6c103512481a60e64be4fea8 (patch) | |
tree | d8598dd4a0841928729ebde1f0b00882e6498604 /src/arch/x86/isa.hh | |
parent | 4b7ea4cb510465bc82c6679407d5a125cfddd18c (diff) | |
parent | d85cd08113e61817fdf1df978f2713ba8b094996 (diff) | |
download | gem5-926ab6e6dbc2417f6c103512481a60e64be4fea8.tar.xz |
merge
Diffstat (limited to 'src/arch/x86/isa.hh')
-rw-r--r-- | src/arch/x86/isa.hh | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/arch/x86/isa.hh b/src/arch/x86/isa.hh index 285f0aa82..9a1880062 100644 --- a/src/arch/x86/isa.hh +++ b/src/arch/x86/isa.hh @@ -31,6 +31,7 @@ #ifndef __ARCH_X86_ISA_HH__ #define __ARCH_X86_ISA_HH__ +#include "arch/x86/floatregs.hh" #include "arch/x86/miscregs.hh" #include "arch/x86/registers.hh" #include "base/types.hh" @@ -65,8 +66,21 @@ namespace X86ISA void setMiscRegNoEffect(int miscReg, MiscReg val); void setMiscReg(int miscReg, MiscReg val, ThreadContext *tc); - int flattenIntIndex(int reg); - int flattenFloatIndex(int reg); + int + flattenIntIndex(int reg) + { + return reg & ~IntFoldBit; + } + + int + flattenFloatIndex(int reg) + { + if (reg >= NUM_FLOATREGS) { + reg = FLOATREG_STACK(reg - NUM_FLOATREGS, + regVal[MISCREG_X87_TOP]); + } + return reg; + } void serialize(EventManager *em, std::ostream &os); void unserialize(EventManager *em, Checkpoint *cp, |