History log of /gem5/src/arch/x86/isa/bitfields.isa
Revision Date Author Comments
# 12045:31d9a81ba286 24-May-2017 Gabe Black <gabeblack@google.com>

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>


# 10924:d02e9c239892 17-Jul-2015 Nilay Vaish <nilay@cs.wisc.edu>

x86: decode instructions with vex prefix

This patch updates the x86 decoder so that it can decode instructions with vex
prefix. It also updates the isa with opcodes from vex opcode maps 1, 2 and 3.
Note that none of the instructions have been implemented yet. The
implementations would be provided in due course of time.


# 10593:a39de7b8d2c9 04-Dec-2014 Gabe Black <gabeblack@google.com>

x86: Rework opcode parsing to support 3 byte opcodes properly.

Instead of counting the number of opcode bytes in an instruction and recording
each byte before the actual opcode, we can represent the path we took to get to
the actual opcode byte by using a type code. That has a couple of advantages.
First, we can disambiguate the properties of opcodes of the same length which
have different properties. Second, it reduces the amount of data stored in an
ExtMachInst, making them slightly easier/faster to create and process. This
also adds some flexibility as far as how different types of opcodes are
handled, which might come in handy if we decide to support VEX or XOP
instructions.

This change also adds tables to support properly decoding 3 byte opcodes.
Before we would fall off the end of some arrays, on top of the ambiguity
described above.

This change doesn't measureably affect performance on the twolf benchmark.


# 7087:fb8d5786ff30 24-May-2010 Nathan Binkert <nate@binkert.org>

copyright: Change HP copyright on x86 code to be more friendly


# 4801:370cc342f031 30-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Add a bitfield to indicate whether or not an REX prefix was present.


# 4717:040769cb51b9 20-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

Add a bitfield to decode based on what prefixes are used.


# 4586:597006d41ca8 19-Jun-2007 Gabe Black <gblack@eecs.umich.edu>

Add a stack size bitfield and expose the mode component of the ExtMachInst.


# 4546:71382cde8725 12-Jun-2007 Gabe Black <gblack@eecs.umich.edu>

Flesh out the bitfields for prefixes.


# 4541:da1910a0d731 12-Jun-2007 Gabe Black <gblack@eecs.umich.edu>

Add an address size bitfield to the isa description and the ExtMachInst


# 4526:4458edb6990d 08-Jun-2007 Gabe Black <gblack@eecs.umich.edu>

Add a bitfield to refer to the opSize member of the extMachInst.


# 4276:f0030662ee2a 21-Mar-2007 Gabe Black <gblack@eecs.umich.edu>

Break out the one and two byte opcodes into different files. Also change what bits decode is done on to reflect where clumps of instructions are.


# 4158:a3fb9e29c6ce 05-Mar-2007 Gabe Black <gblack@eecs.umich.edu>

Stub decoder. This is probably even farther from finished than it looks...