diff options
author | Gabe Black <gabeblack@google.com> | 2017-10-27 13:46:58 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2017-10-31 02:04:33 +0000 |
commit | 1025ef1598b8b7c3d00b82d30458e375697b8eff (patch) | |
tree | 4b9b1b351f2295cff6a38aea7edca2c38dc412e5 /src/arch/x86 | |
parent | 44896ba35b0874b9925ebd7927e196d0eb639b5e (diff) | |
download | gem5-1025ef1598b8b7c3d00b82d30458e375697b8eff.tar.xz |
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 <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/arch/x86')
-rw-r--r-- | src/arch/x86/decoder.cc | 1 |
1 files changed, 1 insertions, 0 deletions
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: |