summaryrefslogtreecommitdiff
path: root/src/arch/x86/emulenv.cc
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@gmail.com>2007-08-03 03:51:30 -0400
committerSteve Reinhardt <stever@gmail.com>2007-08-03 03:51:30 -0400
commit3afc6259757e8ec688701bf3e3d7fcdad28d5b6c (patch)
tree35c0e1ebb596dfe94934fc0f5f064eb523b3013b /src/arch/x86/emulenv.cc
parent62aa1d7f559622dcb04b1b2fe1e2ecec375883a3 (diff)
parent121a894ce0d551e860392f9aa6bd381329a25b96 (diff)
downloadgem5-3afc6259757e8ec688701bf3e3d7fcdad28d5b6c.tar.xz
merge from head
--HG-- extra : convert_revision : 21f7afe2719c00744c0981212c1ee6e442238e01
Diffstat (limited to 'src/arch/x86/emulenv.cc')
-rw-r--r--src/arch/x86/emulenv.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/arch/x86/emulenv.cc b/src/arch/x86/emulenv.cc
index 3a54d7365..28282dc7a 100644
--- a/src/arch/x86/emulenv.cc
+++ b/src/arch/x86/emulenv.cc
@@ -73,7 +73,7 @@ void EmulEnv::doModRM(const ExtMachInst & machInst)
if (machInst.sib.base == INTREG_RBP && machInst.modRM.mod == 0)
base = NUM_INTREGS;
//In -this- special case, we don't use an index.
- if (machInst.sib.index == INTREG_RSP)
+ if (index == INTREG_RSP)
index = NUM_INTREGS;
} else {
if (machInst.addrSize == 2) {
@@ -82,11 +82,9 @@ void EmulEnv::doModRM(const ExtMachInst & machInst)
scale = 0;
base = machInst.modRM.rm | (machInst.rex.b << 3);
if (machInst.modRM.mod == 0 && machInst.modRM.rm == 5) {
- base = NUM_INTREGS;
//Since we need to use a different encoding of this
//instruction anyway, just ignore the base in those cases
-// if (machInst.mode.submode == SixtyFourBitMode)
-// base = NUM_INTREGS+7;
+ base = NUM_INTREGS;
}
}
}