From: Gabe Black Date: Fri, 27 Oct 2017 20:46:58 +0000 (-0700) Subject: x86: Fix VEX instruction decoding. X-Git-Tag: v19.0.0.0~2590 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1025ef1598b8b7c3d00b82d30458e375697b8eff;p=gem5.git x86: Fix VEX instruction decoding. When decoding VEX prefixed instructions, the x86 predecoder wasn't walking past the opcode byte and so was also interpreting it as the modRM byte. Reported-by: likunxi@fas.harvard.edu Change-Id: I6d4bdabfa03411704c48d905c50c7b23072fc615 Reviewed-on: https://gem5-review.googlesource.com/5281 Reviewed-by: Gabe Black Maintainer: Gabe Black --- diff --git a/src/arch/x86/decoder.cc b/src/arch/x86/decoder.cc index 930c2b951..9c4997d6f 100644 --- a/src/arch/x86/decoder.cc +++ b/src/arch/x86/decoder.cc @@ -355,6 +355,7 @@ Decoder::doVexOpcodeState(uint8_t nextByte) DPRINTF(Decoder, "Found VEX opcode %#x.\n", nextByte); emi.opcode.op = nextByte; + consumeByte(); switch (emi.opcode.type) { case TwoByteOpcode: