From 1025ef1598b8b7c3d00b82d30458e375697b8eff Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Fri, 27 Oct 2017 13:46:58 -0700 Subject: [PATCH] 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 --- src/arch/x86/decoder.cc | 1 + 1 file changed, 1 insertion(+) 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: -- 2.30.2