Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/55593 )
Change subject: arch-x86: Don't decode SIB bytes in 32 bit mode.
......................................................................
arch-x86: Don't decode SIB bytes in 32 bit mode.
There was a comment there saying we shouldn't, but then we still did
anyway.
Change-Id: I4a53cf504d38e00fca5d687818149b91354e640d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/55593
Tested-by: kokoro <[email protected]>
Reviewed-by: Gabe Black <[email protected]>
Maintainer: Gabe Black <[email protected]>
---
M src/arch/x86/decoder.cc
1 file changed, 17 insertions(+), 2 deletions(-)
Approvals:
Gabe Black: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/arch/x86/decoder.cc b/src/arch/x86/decoder.cc
index 5d78c5f..ef87ff3 100644
--- a/src/arch/x86/decoder.cc
+++ b/src/arch/x86/decoder.cc
@@ -544,8 +544,7 @@
// If there's an SIB, get that next.
// There is no SIB in 16 bit mode.
- if (modRM.rm == 4 && modRM.mod != 3) {
- // && in 32/64 bit mode)
+ if (modRM.rm == 4 && modRM.mod != 3 && emi.addrSize != 2) {
nextState = SIBState;
} else if (displacementSize) {
nextState = DisplacementState;
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/55593
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: I4a53cf504d38e00fca5d687818149b91354e640d
Gerrit-Change-Number: 55593
Gerrit-PatchSet: 13
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