gem5  v20.1.0.0
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Attributes | Static Private Attributes | List of all members
X86ISA::Decoder Class Reference

#include <decoder.hh>

Inheritance diagram for X86ISA::Decoder:
InstDecoder

Classes

struct  InstBytes
 

Public Member Functions

 Decoder (ISA *isa=nullptr)
 
void setM5Reg (HandyM5Reg m5Reg)
 
void takeOverFrom (Decoder *old)
 
void reset ()
 
void process ()
 
void moreBytes (const PCState &pc, Addr fetchPC, MachInst data)
 
bool needMoreBytes ()
 
bool instReady ()
 
void updateNPC (X86ISA::PCState &nextPC)
 
StaticInstPtr decodeInst (ExtMachInst mach_inst)
 
StaticInstPtr decode (ExtMachInst mach_inst, Addr addr)
 Decode a machine instruction. More...
 
StaticInstPtr decode (X86ISA::PCState &nextPC)
 
StaticInstPtr fetchRomMicroop (MicroPC micropc, StaticInstPtr curMacroop) override
 

Protected Types

enum  State {
  ResetState, FromCacheState, PrefixState, Vex2Of2State,
  Vex2Of3State, Vex3Of3State, VexOpcodeState, OneByteOpcodeState,
  TwoByteOpcodeState, ThreeByte0F38OpcodeState, ThreeByte0F3AOpcodeState, ModRMState,
  SIBState, DisplacementState, ImmediateState, ErrorState
}
 
typedef RegVal CacheKey
 Caching for decoded instruction objects. More...
 
typedef DecodeCache::AddrMap< Decoder::InstBytesDecodePages
 
typedef std::unordered_map< CacheKey, DecodePages * > AddrCacheMap
 
typedef std::unordered_map< CacheKey, DecodeCache::InstMap< ExtMachInst > * > InstCacheMap
 

Protected Member Functions

uint8_t getNextByte ()
 
void getImmediate (int &collected, uint64_t &current, int size)
 
void updateOffsetState ()
 
void consumeByte ()
 
void consumeBytes (int numBytes)
 
State doResetState ()
 
State doFromCacheState ()
 
State doPrefixState (uint8_t)
 
State doVex2Of2State (uint8_t)
 
State doVex2Of3State (uint8_t)
 
State doVex3Of3State (uint8_t)
 
State doVexOpcodeState (uint8_t)
 
State doOneByteOpcodeState (uint8_t)
 
State doTwoByteOpcodeState (uint8_t)
 
State doThreeByte0F38OpcodeState (uint8_t)
 
State doThreeByte0F3AOpcodeState (uint8_t)
 
State doModRMState (uint8_t)
 
State doSIBState (uint8_t)
 
State doDisplacementState ()
 
State doImmediateState ()
 
State processOpcode (ByteTable &immTable, ByteTable &modrmTable, bool addrSizedImm=false)
 
State processExtendedOpcode (ByteTable &immTable)
 

Protected Attributes

MachInst fetchChunk
 
InstBytesinstBytes = &dummy
 
int chunkIdx
 
Addr basePC = 0
 
Addr origPC = 0
 
int offset = 0
 
ExtMachInst emi
 
X86Mode mode = LongMode
 
X86SubMode submode = SixtyFourBitMode
 
uint8_t altOp = 0
 
uint8_t defOp = 0
 
uint8_t altAddr = 0
 
uint8_t defAddr = 0
 
uint8_t stack = 0
 
bool outOfBytes = true
 
bool instDone = false
 
int displacementSize
 
int immediateSize
 
int immediateCollected
 
State state = ResetState
 
DecodePagesdecodePages = nullptr
 
AddrCacheMap addrCacheMap
 
DecodeCache::InstMap< ExtMachInst > * instMap = nullptr
 

Static Protected Attributes

static InstBytes dummy
 
static InstCacheMap instCacheMap
 

Private Attributes

const typedef uint8_t ByteTable [256]
 

Static Private Attributes

static const uint8_t SizeTypeToSize [3][10]
 
static ByteTable Prefixes
 
static ByteTable UsesModRMOneByte
 
static ByteTable UsesModRMTwoByte
 
static ByteTable UsesModRMThreeByte0F38
 
static ByteTable UsesModRMThreeByte0F3A
 
static ByteTable ImmediateTypeOneByte
 
static ByteTable ImmediateTypeTwoByte
 
static ByteTable ImmediateTypeThreeByte0F38
 
static ByteTable ImmediateTypeThreeByte0F3A
 
static ByteTable ImmediateTypeVex [10]
 
static X86ISAInst::MicrocodeRom microcodeRom
 

Detailed Description

Definition at line 52 of file decoder.hh.

Member Typedef Documentation

◆ AddrCacheMap

typedef std::unordered_map<CacheKey, DecodePages *> X86ISA::Decoder::AddrCacheMap
protected

Definition at line 236 of file decoder.hh.

◆ CacheKey

typedef RegVal X86ISA::Decoder::CacheKey
protected

Caching for decoded instruction objects.

Definition at line 232 of file decoder.hh.

◆ DecodePages

Definition at line 234 of file decoder.hh.

◆ InstCacheMap

typedef std::unordered_map< CacheKey, DecodeCache::InstMap<ExtMachInst> *> X86ISA::Decoder::InstCacheMap
protected

Definition at line 241 of file decoder.hh.

Member Enumeration Documentation

◆ State

enum X86ISA::Decoder::State
protected
Enumerator
ResetState 
FromCacheState 
PrefixState 
Vex2Of2State 
Vex2Of3State 
Vex3Of3State 
VexOpcodeState 
OneByteOpcodeState 
TwoByteOpcodeState 
ThreeByte0F38OpcodeState 
ThreeByte0F3AOpcodeState 
ModRMState 
SIBState 
DisplacementState 
ImmediateState 
ErrorState 

Definition at line 184 of file decoder.hh.

Constructor & Destructor Documentation

◆ Decoder()

X86ISA::Decoder::Decoder ( ISA isa = nullptr)
inline

Definition at line 245 of file decoder.hh.

References emi, mode, X86ISA::ExtMachInst::mode, X86ISA::ExtMachInst::reset(), and submode.

Member Function Documentation

◆ consumeByte()

void X86ISA::Decoder::consumeByte ( )
inlineprotected

◆ consumeBytes()

void X86ISA::Decoder::consumeBytes ( int  numBytes)
inlineprotected

Definition at line 164 of file decoder.hh.

References offset, and updateOffsetState().

Referenced by getImmediate().

◆ decode() [1/2]

StaticInstPtr X86ISA::Decoder::decode ( ExtMachInst  mach_inst,
Addr  addr 
)

Decode a machine instruction.

Parameters
mach_instThe binary instruction to decode.
Return values
Apointer to the corresponding StaticInst object.

Definition at line 675 of file decoder.cc.

References decodeInst(), instMap, and X86ISA::si.

Referenced by decode().

◆ decode() [2/2]

StaticInstPtr X86ISA::Decoder::decode ( X86ISA::PCState nextPC)

◆ decodeInst()

StaticInstPtr X86ISA::Decoder::decodeInst ( ExtMachInst  mach_inst)

Referenced by decode().

◆ doDisplacementState()

Decoder::State X86ISA::Decoder::doDisplacementState ( )
protected

◆ doFromCacheState()

Decoder::State X86ISA::Decoder::doFromCacheState ( )
protected

◆ doImmediateState()

Decoder::State X86ISA::Decoder::doImmediateState ( )
protected

◆ doModRMState()

Decoder::State X86ISA::Decoder::doModRMState ( uint8_t  nextByte)
protected

◆ doOneByteOpcodeState()

Decoder::State X86ISA::Decoder::doOneByteOpcodeState ( uint8_t  nextByte)
protected

◆ doPrefixState()

Decoder::State X86ISA::Decoder::doPrefixState ( uint8_t  nextByte)
protected

◆ doResetState()

Decoder::State X86ISA::Decoder::doResetState ( )
protected

◆ doSIBState()

Decoder::State X86ISA::Decoder::doSIBState ( uint8_t  nextByte)
protected

◆ doThreeByte0F38OpcodeState()

Decoder::State X86ISA::Decoder::doThreeByte0F38OpcodeState ( uint8_t  nextByte)
protected

◆ doThreeByte0F3AOpcodeState()

Decoder::State X86ISA::Decoder::doThreeByte0F3AOpcodeState ( uint8_t  nextByte)
protected

◆ doTwoByteOpcodeState()

Decoder::State X86ISA::Decoder::doTwoByteOpcodeState ( uint8_t  nextByte)
protected

◆ doVex2Of2State()

Decoder::State X86ISA::Decoder::doVex2Of2State ( uint8_t  nextByte)
protected

◆ doVex2Of3State()

Decoder::State X86ISA::Decoder::doVex2Of3State ( uint8_t  nextByte)
protected

◆ doVex3Of3State()

Decoder::State X86ISA::Decoder::doVex3Of3State ( uint8_t  nextByte)
protected

◆ doVexOpcodeState()

Decoder::State X86ISA::Decoder::doVexOpcodeState ( uint8_t  nextByte)
protected

◆ fetchRomMicroop()

StaticInstPtr X86ISA::Decoder::fetchRomMicroop ( MicroPC  micropc,
StaticInstPtr  curMacroop 
)
overridevirtual

Reimplemented from InstDecoder.

Definition at line 731 of file decoder.cc.

References X86ISAInst::MicrocodeRom::fetchMicroop(), and microcodeRom.

◆ getImmediate()

void X86ISA::Decoder::getImmediate ( int &  collected,
uint64_t &  current,
int  size 
)
inlineprotected

Definition at line 115 of file decoder.hh.

References consumeBytes(), fetchChunk, immediateCollected, X86ISA::mask, and offset.

Referenced by doDisplacementState(), and doImmediateState().

◆ getNextByte()

uint8_t X86ISA::Decoder::getNextByte ( )
inlineprotected

Definition at line 109 of file decoder.hh.

References fetchChunk, and offset.

Referenced by process().

◆ instReady()

bool X86ISA::Decoder::instReady ( )
inline

Definition at line 314 of file decoder.hh.

References instDone.

◆ moreBytes()

void X86ISA::Decoder::moreBytes ( const PCState pc,
Addr  fetchPC,
MachInst  data 
)
inline

Definition at line 303 of file decoder.hh.

References basePC, data, DPRINTF, fetchChunk, letoh(), offset, outOfBytes, X86ISA::pc, and process().

◆ needMoreBytes()

bool X86ISA::Decoder::needMoreBytes ( )
inline

Definition at line 313 of file decoder.hh.

References outOfBytes.

◆ process()

void X86ISA::Decoder::process ( )

◆ processExtendedOpcode()

State X86ISA::Decoder::processExtendedOpcode ( ByteTable immTable)
protected

◆ processOpcode()

Decoder::State X86ISA::Decoder::processOpcode ( ByteTable immTable,
ByteTable modrmTable,
bool  addrSizedImm = false 
)
protected

◆ reset()

void X86ISA::Decoder::reset ( )
inline

Definition at line 296 of file decoder.hh.

References ResetState, and state.

◆ setM5Reg()

void X86ISA::Decoder::setM5Reg ( HandyM5Reg  m5Reg)
inline

◆ takeOverFrom()

void X86ISA::Decoder::takeOverFrom ( Decoder old)
inline

Definition at line 283 of file decoder.hh.

References altAddr, altOp, defAddr, defOp, emi, mode, X86ISA::ExtMachInst::mode, stack, and submode.

◆ updateNPC()

void X86ISA::Decoder::updateNPC ( X86ISA::PCState nextPC)
inline

◆ updateOffsetState()

void X86ISA::Decoder::updateOffsetState ( )
inlineprotected

Member Data Documentation

◆ addrCacheMap

AddrCacheMap X86ISA::Decoder::addrCacheMap
protected

Definition at line 237 of file decoder.hh.

Referenced by setM5Reg().

◆ altAddr

uint8_t X86ISA::Decoder::altAddr = 0
protected

Definition at line 104 of file decoder.hh.

Referenced by processOpcode(), setM5Reg(), and takeOverFrom().

◆ altOp

uint8_t X86ISA::Decoder::altOp = 0
protected

Definition at line 102 of file decoder.hh.

Referenced by processOpcode(), setM5Reg(), and takeOverFrom().

◆ basePC

Addr X86ISA::Decoder::basePC = 0
protected

◆ ByteTable

const typedef uint8_t X86ISA::Decoder::ByteTable[256]
private

Definition at line 57 of file decoder.hh.

◆ chunkIdx

int X86ISA::Decoder::chunkIdx
protected

Definition at line 90 of file decoder.hh.

Referenced by doFromCacheState(), doResetState(), and updateOffsetState().

◆ decodePages

DecodePages* X86ISA::Decoder::decodePages = nullptr
protected

Definition at line 235 of file decoder.hh.

Referenced by doResetState(), and setM5Reg().

◆ defAddr

uint8_t X86ISA::Decoder::defAddr = 0
protected

Definition at line 105 of file decoder.hh.

Referenced by processOpcode(), setM5Reg(), and takeOverFrom().

◆ defOp

uint8_t X86ISA::Decoder::defOp = 0
protected

Definition at line 103 of file decoder.hh.

Referenced by doModRMState(), processOpcode(), setM5Reg(), and takeOverFrom().

◆ displacementSize

int X86ISA::Decoder::displacementSize
protected

Definition at line 177 of file decoder.hh.

Referenced by doDisplacementState(), doModRMState(), and doSIBState().

◆ dummy

Decoder::InstBytes X86ISA::Decoder::dummy
staticprotected

Definition at line 85 of file decoder.hh.

◆ emi

ExtMachInst X86ISA::Decoder::emi
protected

◆ fetchChunk

MachInst X86ISA::Decoder::fetchChunk
protected

◆ immediateCollected

int X86ISA::Decoder::immediateCollected
protected

Definition at line 182 of file decoder.hh.

Referenced by doDisplacementState(), doImmediateState(), doResetState(), and getImmediate().

◆ immediateSize

int X86ISA::Decoder::immediateSize
protected

◆ ImmediateTypeOneByte

const Decoder::ByteTable X86ISA::Decoder::ImmediateTypeOneByte
staticprivate
Initial value:
=
{
0 , 0 , 0 , 0 , BY, ZW, 0 , 0 , 0 , 0 , 0 , 0 , BY, ZW, 0 , 0 ,
0 , 0 , 0 , 0 , BY, ZW, 0 , 0 , 0 , 0 , 0 , 0 , BY, ZW, 0 , 0 ,
0 , 0 , 0 , 0 , BY, ZW, 0 , 0 , 0 , 0 , 0 , 0 , BY, ZW, 0 , 0 ,
0 , 0 , 0 , 0 , BY, ZW, 0 , 0 , 0 , 0 , 0 , 0 , BY, ZW, 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , ZW, ZW, BY, BY, 0 , 0 , 0 , 0 ,
BY, BY, BY, BY, BY, BY, BY, BY, BY, BY, BY, BY, BY, BY, BY, BY,
BY, ZW, BY, BY, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
VW, VW, VW, VW, 0 , 0 , 0 , 0 , BY, ZW, 0 , 0 , 0 , 0 , 0 , 0 ,
BY, BY, BY, BY, BY, BY, BY, BY, VW, VW, VW, VW, VW, VW, VW, VW,
BY, BY, WO, 0 , 0 , 0 , BY, ZW, EN, 0 , WO, 0 , 0 , BY, 0 , 0 ,
0 , 0 , 0 , 0 , BY, BY, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
BY, BY, BY, BY, BY, BY, BY, BY, ZW, ZW, PO, BY, 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0
}

Definition at line 65 of file decoder.hh.

Referenced by doOneByteOpcodeState(), doVex2Of3State(), and doVex3Of3State().

◆ ImmediateTypeThreeByte0F38

const Decoder::ByteTable X86ISA::Decoder::ImmediateTypeThreeByte0F38
staticprivate
Initial value:
=
{
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0
}

Definition at line 67 of file decoder.hh.

Referenced by doThreeByte0F38OpcodeState(), and doVexOpcodeState().

◆ ImmediateTypeThreeByte0F3A

const Decoder::ByteTable X86ISA::Decoder::ImmediateTypeThreeByte0F3A
staticprivate
Initial value:
=
{
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , BY, BY, BY, BY, BY, BY, BY, BY,
0 , 0 , 0 , 0 , BY,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, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0
}

Definition at line 66 of file decoder.hh.

Referenced by doTwoByteOpcodeState(), and doVexOpcodeState().

◆ ImmediateTypeVex

ByteTable X86ISA::Decoder::ImmediateTypeVex[10]
staticprivate

Definition at line 69 of file decoder.hh.

◆ instBytes

InstBytes* X86ISA::Decoder::instBytes = &dummy
protected

Definition at line 89 of file decoder.hh.

Referenced by decode(), doFromCacheState(), doResetState(), process(), and updateOffsetState().

◆ instCacheMap

Decoder::InstCacheMap X86ISA::Decoder::instCacheMap
staticprotected

Definition at line 242 of file decoder.hh.

Referenced by setM5Reg().

◆ instDone

bool X86ISA::Decoder::instDone = false
protected

◆ instMap

DecodeCache::InstMap<ExtMachInst>* X86ISA::Decoder::instMap = nullptr
protected

Definition at line 239 of file decoder.hh.

Referenced by decode(), and setM5Reg().

◆ microcodeRom

X86ISAInst::MicrocodeRom X86ISA::Decoder::microcodeRom
staticprivate

Definition at line 71 of file decoder.hh.

Referenced by fetchRomMicroop().

◆ mode

X86Mode X86ISA::Decoder::mode = LongMode
protected

Definition at line 100 of file decoder.hh.

Referenced by Decoder(), setM5Reg(), and takeOverFrom().

◆ offset

int X86ISA::Decoder::offset = 0
protected

◆ origPC

Addr X86ISA::Decoder::origPC = 0
protected

Definition at line 94 of file decoder.hh.

Referenced by decode(), doFromCacheState(), doResetState(), and updateNPC().

◆ outOfBytes

bool X86ISA::Decoder::outOfBytes = true
protected

Definition at line 173 of file decoder.hh.

Referenced by doFromCacheState(), moreBytes(), needMoreBytes(), process(), and updateOffsetState().

◆ Prefixes

const Decoder::ByteTable X86ISA::Decoder::Prefixes
staticprivate
Initial value:
=
{
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , ES, 0 , 0 , 0 , 0 , 0 , 0 , 0 , CS, 0,
0 , 0 , 0 , 0 , 0 , 0 , SS, 0 , 0 , 0 , 0 , 0 , 0 , 0 , DS, 0,
RX, RX, RX, RX, RX, RX, RX, RX, RX, RX, RX, RX, RX, RX, RX, RX,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , FS, GS, OO, AO, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , V3, V2, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
LO, 0 , RN, RE, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0
}

Definition at line 58 of file decoder.hh.

◆ SizeTypeToSize

const uint8_t X86ISA::Decoder::SizeTypeToSize
staticprivate
Initial value:
=
{
{0, 1, 2, 4, 8, 16, 2, 2, 3, 4 },
{0, 1, 2, 4, 8, 16, 4, 4, 3, 6 },
{0, 1, 2, 4, 8, 16, 8, 4, 3, 0 }
}

Definition at line 56 of file decoder.hh.

Referenced by processOpcode().

◆ stack

uint8_t X86ISA::Decoder::stack = 0
protected

Definition at line 106 of file decoder.hh.

Referenced by processOpcode(), setM5Reg(), and takeOverFrom().

◆ state

State X86ISA::Decoder::state = ResetState
protected

Definition at line 204 of file decoder.hh.

Referenced by process(), and reset().

◆ submode

X86SubMode X86ISA::Decoder::submode = SixtyFourBitMode
protected

Definition at line 101 of file decoder.hh.

Referenced by Decoder(), setM5Reg(), and takeOverFrom().

◆ UsesModRMOneByte

const Decoder::ByteTable X86ISA::Decoder::UsesModRMOneByte
staticprivate
Initial value:
=
{
1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0,
1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0,
1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0,
1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 1 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
1 , 1 , 0 , 0 , 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1
}

Definition at line 60 of file decoder.hh.

Referenced by doOneByteOpcodeState(), doVex2Of3State(), and doVex3Of3State().

◆ UsesModRMThreeByte0F38

const Decoder::ByteTable X86ISA::Decoder::UsesModRMThreeByte0F38
staticprivate
Initial value:
=
{
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0,
1 , 0 , 0 , 0 , 1 , 1 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 0,
1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0,
1 , 1 , 1 , 1 , 1 , 1 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1,
1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0
}

Definition at line 62 of file decoder.hh.

Referenced by doThreeByte0F38OpcodeState(), and doVexOpcodeState().

◆ UsesModRMThreeByte0F3A

const Decoder::ByteTable X86ISA::Decoder::UsesModRMThreeByte0F3A
staticprivate
Initial value:
=
{
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1,
0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
1 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
1 , 1 , 1 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0
}

Definition at line 63 of file decoder.hh.

Referenced by doThreeByte0F3AOpcodeState(), and doVexOpcodeState().

◆ UsesModRMTwoByte

const Decoder::ByteTable X86ISA::Decoder::UsesModRMTwoByte
staticprivate
Initial value:
=
{
1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 1,
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1,
1 , 1 , 1 , 1 , 1 , 0 , 1 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1,
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1,
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1,
1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1,
0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1,
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 1 , 1 , 1 , 1 , 1 , 1,
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1,
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1,
1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0
}

Definition at line 61 of file decoder.hh.

Referenced by doTwoByteOpcodeState(), and doVexOpcodeState().


The documentation for this class was generated from the following files:
X86ISA::RX
const uint8_t RX
Definition: decoder_tables.cc:55
X86ISA::RN
const uint8_t RN
Definition: decoder_tables.cc:54
X86ISA::V3
const uint8_t V3
Definition: decoder_tables.cc:57
X86ISA::V2
const uint8_t V2
Definition: decoder_tables.cc:56
X86ISA::CS
const uint8_t CS
Definition: decoder_tables.cc:43
X86ISA::ES
const uint8_t ES
Definition: decoder_tables.cc:45
X86ISA::LO
const uint8_t LO
Definition: decoder_tables.cc:52
X86ISA::OO
const uint8_t OO
Definition: decoder_tables.cc:50
X86ISA::RE
const uint8_t RE
Definition: decoder_tables.cc:53
X86ISA::BY
@ BY
Definition: decoder_tables.cc:171
X86ISA::ZW
@ ZW
Definition: decoder_tables.cc:183
X86ISA::FS
const uint8_t FS
Definition: decoder_tables.cc:46
X86ISA::VW
@ VW
Definition: decoder_tables.cc:181
X86ISA::GS
const uint8_t GS
Definition: decoder_tables.cc:47
X86ISA::WO
@ WO
Definition: decoder_tables.cc:173
X86ISA::EN
@ EN
Definition: decoder_tables.cc:186
X86ISA::SS
const uint8_t SS
Definition: decoder_tables.cc:48
X86ISA::PO
@ PO
Definition: decoder_tables.cc:188
X86ISA::AO
const uint8_t AO
Definition: decoder_tables.cc:51
X86ISA::DS
const uint8_t DS
Definition: decoder_tables.cc:44

Generated on Wed Sep 30 2020 14:03:14 for gem5 by doxygen 1.8.17