arch-x86: Handle a special case for MODRM in 16 bit mode.
When the address size is 16 bit, the mod field is 0, and the rm is 6, there is no base register, only a displacement. Change-Id: Ib67a6e5ce617d08913b9ca6dee66877f0154ffe1 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/55285 Reviewed-by: Gabe Black <gabe.black@gmail.com> Maintainer: Gabe Black <gabe.black@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user