summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/isa.cc')
-rw-r--r--src/arch/x86/isa.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/arch/x86/isa.cc b/src/arch/x86/isa.cc
index 0b5523864..5305b1058 100644
--- a/src/arch/x86/isa.cc
+++ b/src/arch/x86/isa.cc
@@ -127,6 +127,13 @@ ISA::readMiscReg(int miscReg, ThreadContext * tc)
if (miscReg == MISCREG_TSC) {
return regVal[MISCREG_TSC] + tc->getCpuPtr()->curCycle();
}
+
+ if (miscReg == MISCREG_FSW) {
+ MiscReg fsw = regVal[MISCREG_FSW];
+ MiscReg top = regVal[MISCREG_X87_TOP];
+ return (fsw & (~(7ULL << 11))) + (top << 11);
+ }
+
return readMiscRegNoEffect(miscReg);
}