summaryrefslogtreecommitdiff
path: root/src/arch/x86/emulenv.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/emulenv.cc')
-rw-r--r--src/arch/x86/emulenv.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/arch/x86/emulenv.cc b/src/arch/x86/emulenv.cc
index 8e4600a14..7e4a9fc55 100644
--- a/src/arch/x86/emulenv.cc
+++ b/src/arch/x86/emulenv.cc
@@ -118,8 +118,7 @@ void EmulEnv::doModRM(const ExtMachInst & machInst)
//Figure out what segment to use. This won't be entirely accurate since
//the presence of a displacement is supposed to make the instruction
//default to the data segment.
- if ((base != INTREG_RBP && base != INTREG_RSP) ||
- 0/*Has an immediate offset*/) {
+ if ((base != INTREG_RBP && base != INTREG_RSP) || machInst.dispSize) {
seg = SEGMENT_REG_DS;
//Handle any segment override that might have been in the instruction
int segFromInst = machInst.legacy.seg;