diff --git a/src/arch/x86/emulenv.cc b/src/arch/x86/emulenv.cc index bfca1e513d..44afc5acc9 100644 --- a/src/arch/x86/emulenv.cc +++ b/src/arch/x86/emulenv.cc @@ -82,7 +82,8 @@ void EmulEnv::doModRM(const ExtMachInst & machInst) base = INTREG_RDI; break; case 6: - base = INTREG_RBP; + // There is a special case when mod is 0 and rm is 6. + base = machInst.modRM.mod == 0 ? INTREG_T0 : INTREG_RBP; break; case 7: base = INTREG_RBX;