Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/55503 )
(
3 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the
submitted one.
)Change subject: arch-x86: Use 16 bit modRM encoding if address size is 16
bit.
......................................................................
arch-x86: Use 16 bit modRM encoding if address size is 16 bit.
The modRM byte should be interpreted with 16 bit rules if the address
size is 16 bits, whether that's because the address size is that by
default, or because it was overridden. It should not be based on the
operand size in any case.
Change-Id: I8827abe1eea8905b0404f7402fb9531804d63fae
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/55503
Maintainer: Gabe Black <[email protected]>
Reviewed-by: Matt Sinclair <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/arch/x86/decoder.cc
1 file changed, 19 insertions(+), 1 deletion(-)
Approvals:
Matt Sinclair: Looks good to me, approved
Gabe Black: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/arch/x86/decoder.cc b/src/arch/x86/decoder.cc
index 842e0ad..4c79872 100644
--- a/src/arch/x86/decoder.cc
+++ b/src/arch/x86/decoder.cc
@@ -515,7 +515,7 @@
State nextState = ErrorState;
ModRM modRM = nextByte;
DPRINTF(Decoder, "Found modrm byte %#x.\n", nextByte);
- if (defOp == 1) {
+ if (emi.addrSize == 2) {
// Figure out 16 bit displacement size.
if ((modRM.mod == 0 && modRM.rm == 6) || modRM.mod == 2)
displacementSize = 2;
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/55503
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: I8827abe1eea8905b0404f7402fb9531804d63fae
Gerrit-Change-Number: 55503
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