summaryrefslogtreecommitdiff
path: root/src/arch/x86/decoder.hh
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2015-07-17 11:31:22 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2015-07-17 11:31:22 -0500
commit0ef3dcc27b0fd03df0aa38a4af05bf536be29c49 (patch)
tree9a3494b6304b6139524340c2ce6e9d5e869a7028 /src/arch/x86/decoder.hh
parentfc5bf6713f191047e07f33a788d099b2bbd9faf4 (diff)
downloadgem5-0ef3dcc27b0fd03df0aa38a4af05bf536be29c49.tar.xz
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.
Diffstat (limited to 'src/arch/x86/decoder.hh')
-rw-r--r--src/arch/x86/decoder.hh9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/arch/x86/decoder.hh b/src/arch/x86/decoder.hh
index a37fccfb1..6cd0c6199 100644
--- a/src/arch/x86/decoder.hh
+++ b/src/arch/x86/decoder.hh
@@ -64,6 +64,7 @@ class Decoder
static ByteTable ImmediateTypeTwoByte;
static ByteTable ImmediateTypeThreeByte0F38;
static ByteTable ImmediateTypeThreeByte0F3A;
+ static ByteTable ImmediateTypeVex[10];
protected:
struct InstBytes
@@ -175,6 +176,9 @@ class Decoder
ResetState,
FromCacheState,
PrefixState,
+ TwoByteVexState,
+ ThreeByteVexFirstState,
+ ThreeByteVexSecondState,
OneByteOpcodeState,
TwoByteOpcodeState,
ThreeByte0F38OpcodeState,
@@ -193,6 +197,9 @@ class Decoder
State doResetState();
State doFromCacheState();
State doPrefixState(uint8_t);
+ State doTwoByteVexState(uint8_t);
+ State doThreeByteVexFirstState(uint8_t);
+ State doThreeByteVexSecondState(uint8_t);
State doOneByteOpcodeState(uint8_t);
State doTwoByteOpcodeState(uint8_t);
State doThreeByte0F38OpcodeState(uint8_t);
@@ -205,6 +212,8 @@ class Decoder
//Process the actual opcode found earlier, using the supplied tables.
State processOpcode(ByteTable &immTable, ByteTable &modrmTable,
bool addrSizedImm = false);
+ // Process the opcode found with VEX / XOP prefix.
+ State processExtendedOpcode(ByteTable &immTable);
protected:
/// Caching for decoded instruction objects.