Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/55285 )
(
2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the
submitted one.
)Change subject: arch-x86: Handle a special case for MODRM in 16 bit mode.
......................................................................
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 <[email protected]>
Maintainer: Gabe Black <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/arch/x86/emulenv.cc
1 file changed, 18 insertions(+), 1 deletion(-)
Approvals:
Gabe Black: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/arch/x86/emulenv.cc b/src/arch/x86/emulenv.cc
index bfca1e5..44afc5a 100644
--- a/src/arch/x86/emulenv.cc
+++ b/src/arch/x86/emulenv.cc
@@ -82,7 +82,8 @@
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;
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/55285
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ib67a6e5ce617d08913b9ca6dee66877f0154ffe1
Gerrit-Change-Number: 55285
Gerrit-PatchSet: 5
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Bradford Beckmann <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Matt Sinclair <[email protected]>
Gerrit-Reviewer: Matthew Poremba <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s