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 <noreply+kokoro@google.com> Reviewed-by: Gabe Black <gabe.black@gmail.com> Maintainer: Gabe Black <gabe.black@gmail.com>
This commit is contained in:
@@ -544,8 +544,7 @@ Decoder::doModRMState(uint8_t nextByte)
|
||||
|
||||
// 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;
|
||||
|
||||
Reference in New Issue
Block a user