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/bitfields.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/bitfields.isa')
-rw-r--r-- | src/arch/x86/isa/bitfields.isa | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/arch/x86/isa/bitfields.isa b/src/arch/x86/isa/bitfields.isa index b5121f4e3..8f2dec6e7 100644 --- a/src/arch/x86/isa/bitfields.isa +++ b/src/arch/x86/isa/bitfields.isa @@ -88,11 +88,5 @@ def bitfield MODE mode; def bitfield MODE_MODE mode.mode; def bitfield MODE_SUBMODE mode.submode; -def bitfield VEX_R vex.first.r; -def bitfield VEX_X vex.first.x; -def bitfield VEX_B vex.first.b; -def bitfield VEX_MAP vex.first.map_select; -def bitfield VEX_W vex.second.w; -def bitfield VEX_VVVV vex.second.vvvv; -def bitfield VEX_L vex.second.l; -def bitfield VEX_PP vex.second.pp; +def bitfield VEX_V vex.v; +def bitfield VEX_L vex.l; |