diff options
author | Gabe Black <gabeblack@google.com> | 2017-05-24 03:09:56 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2017-05-26 20:01:03 +0000 |
commit | 7159ea669825a2a876dc3f0f2022336b517299a0 (patch) | |
tree | 24775f9c47c96ccfcf82dcebb815bf69caafbfc2 /src/arch/x86/isa/decoder/decoder.isa | |
parent | 91228e9b222513ffc8008558fd4b3f468cccdbbe (diff) | |
download | gem5-7159ea669825a2a876dc3f0f2022336b517299a0.tar.xz |
x86: Rework how VEX prefixes are decoded.
Remove redundant information from the ExtMachInst, hash the vex
information to ensure the decode cache works properly, print the vex info
when printing an ExtMachInst, consider the vex info when comparing two
ExtMachInsts, fold the info from the vex prefixes into existing settings,
remove redundant decode code, handle vex prefixes one byte at a time and
don't bother building up the entire prefix, and let instructions that care
about vex use it in their implementation, instead of developing an entire
parallel decode tree.
This also eliminates the error prone vex immediate decode table which was
incomplete and would result in an out of bounds access for incorrectly
encoded instructions or when the CPU was mispeculating, as it was (as far
as I can tell) redundant with the tables that already existed for two and
three byte opcodes. There were differences, but I think those may have
been mistakes based on the documentation I found.
Also, in 32 bit mode, the VEX prefixes might actually be LDS or LES
instructions which are still legal in that mode. A valid VEX prefix would
look like an LDS/LES with an otherwise invalid modrm encoding, so use that
as a signal to abort processing the VEX and turn the instruction into an
LES/LDS as appropriate.
Change-Id: Icb367eaaa35590692df1c98862f315da4c139f5c
Reviewed-on: https://gem5-review.googlesource.com/3501
Reviewed-by: Joe Gross <joe.gross@amd.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Diffstat (limited to 'src/arch/x86/isa/decoder/decoder.isa')
-rw-r--r-- | src/arch/x86/isa/decoder/decoder.isa | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/arch/x86/isa/decoder/decoder.isa b/src/arch/x86/isa/decoder/decoder.isa index 07006fe1a..eaa579817 100644 --- a/src/arch/x86/isa/decoder/decoder.isa +++ b/src/arch/x86/isa/decoder/decoder.isa @@ -49,7 +49,6 @@ decode LEGACY_LOCK default Unknown::unknown() ##include "two_byte_opcodes.isa" ##include "three_byte_0f38_opcodes.isa" ##include "three_byte_0f3a_opcodes.isa" - ##include "vex_opcodes.isa" } //Lock prefix ##include "locked_opcodes.isa" |