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

#include <decoder.hh>

Inheritance diagram for gem5::X86ISA::Decoder:
gem5::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)
 
bool needMoreBytes ()
 
bool instReady ()
 
void updateNPC (X86ISA::PCState &nextPC)
 
StaticInstPtr decode (X86ISA::PCState &nextPC)
 
StaticInstPtr fetchRomMicroop (MicroPC micropc, StaticInstPtr curMacroop) override
 
- Public Member Functions inherited from gem5::InstDecoder
template<typename MoreBytesType >
 InstDecoder (MoreBytesType *mb_buf)
 
void * moreBytesPtr () const
 
size_t moreBytesSize () const
 
Addr pcMask () const
 

Protected Types

enum  State {
  ResetState, FromCacheState, PrefixState, Vex2Of2State,
  Vex2Of3State, Vex3Of3State, VexOpcodeState, OneByteOpcodeState,
  TwoByteOpcodeState, ThreeByte0F38OpcodeState, ThreeByte0F3AOpcodeState, ModRMState,
  SIBState, DisplacementState, ImmediateState, ErrorState
}
 
using MachInst = uint64_t
 
typedef RegVal CacheKey
 Caching for decoded instruction objects. More...
 
typedef decode_cache::AddrMap< Decoder::InstBytesDecodePages
 
typedef std::unordered_map< CacheKey, DecodePages * > AddrCacheMap
 
typedef std::unordered_map< CacheKey, decode_cache::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)
 
StaticInstPtr decodeInst (ExtMachInst mach_inst)
 
StaticInstPtr decode (ExtMachInst mach_inst, Addr addr)
 Decode a machine instruction. More...
 

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
 
decode_cache::InstMap< ExtMachInst > * instMap = nullptr
 
- Protected Attributes inherited from gem5::InstDecoder
void * _moreBytesPtr
 
size_t _moreBytesSize
 
Addr _pcMask
 

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 55 of file decoder.hh.

Member Typedef Documentation

◆ AddrCacheMap

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

Definition at line 242 of file decoder.hh.

◆ CacheKey

Caching for decoded instruction objects.

Definition at line 238 of file decoder.hh.

◆ DecodePages

Definition at line 240 of file decoder.hh.

◆ InstCacheMap

Definition at line 247 of file decoder.hh.

◆ MachInst

using gem5::X86ISA::Decoder::MachInst = uint64_t
protected

Definition at line 77 of file decoder.hh.

Member Enumeration Documentation

◆ State

Enumerator
ResetState 
FromCacheState 
PrefixState 
Vex2Of2State 
Vex2Of3State 
Vex3Of3State 
VexOpcodeState 
OneByteOpcodeState 
TwoByteOpcodeState 
ThreeByte0F38OpcodeState 
ThreeByte0F3AOpcodeState 
ModRMState 
SIBState 
DisplacementState 
ImmediateState 
ErrorState 

Definition at line 189 of file decoder.hh.

Constructor & Destructor Documentation

◆ Decoder()

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

Member Function Documentation

◆ consumeByte()

void gem5::X86ISA::Decoder::consumeByte ( )
inlineprotected

◆ consumeBytes()

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

Definition at line 169 of file decoder.hh.

References offset, and updateOffsetState().

Referenced by getImmediate().

◆ decode() [1/2]

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

Decode a machine instruction.

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

Definition at line 679 of file decoder.cc.

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

Referenced by decode().

◆ decode() [2/2]

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

◆ decodeInst()

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

Referenced by decode().

◆ doDisplacementState()

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

◆ doFromCacheState()

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

◆ doImmediateState()

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

◆ doModRMState()

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

◆ doOneByteOpcodeState()

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

◆ doPrefixState()

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

◆ doResetState()

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

◆ doSIBState()

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

◆ doThreeByte0F38OpcodeState()

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

◆ doThreeByte0F3AOpcodeState()

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

◆ doTwoByteOpcodeState()

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

◆ doVex2Of2State()

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

◆ doVex2Of3State()

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

◆ doVex3Of3State()

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

◆ doVexOpcodeState()

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

◆ fetchRomMicroop()

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

Reimplemented from gem5::InstDecoder.

Definition at line 741 of file decoder.cc.

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

◆ getImmediate()

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

◆ getNextByte()

uint8_t gem5::X86ISA::Decoder::getNextByte ( )
inlineprotected

Definition at line 114 of file decoder.hh.

References fetchChunk, and offset.

Referenced by process().

◆ instReady()

bool gem5::X86ISA::Decoder::instReady ( )
inline

Definition at line 327 of file decoder.hh.

References instDone.

◆ moreBytes()

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

Definition at line 316 of file decoder.hh.

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

◆ needMoreBytes()

bool gem5::X86ISA::Decoder::needMoreBytes ( )
inline

Definition at line 326 of file decoder.hh.

References outOfBytes.

◆ process()

void gem5::X86ISA::Decoder::process ( )

◆ processExtendedOpcode()

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

◆ processOpcode()

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

◆ reset()

void gem5::X86ISA::Decoder::reset ( )
inline

Definition at line 309 of file decoder.hh.

References ResetState, and state.

◆ setM5Reg()

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

◆ takeOverFrom()

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

Definition at line 296 of file decoder.hh.

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

◆ updateNPC()

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

◆ updateOffsetState()

void gem5::X86ISA::Decoder::updateOffsetState ( )
inlineprotected

Member Data Documentation

◆ addrCacheMap

AddrCacheMap gem5::X86ISA::Decoder::addrCacheMap
protected

Definition at line 243 of file decoder.hh.

Referenced by setM5Reg().

◆ altAddr

uint8_t gem5::X86ISA::Decoder::altAddr = 0
protected

Definition at line 109 of file decoder.hh.

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

◆ altOp

uint8_t gem5::X86ISA::Decoder::altOp = 0
protected

Definition at line 107 of file decoder.hh.

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

◆ basePC

Addr gem5::X86ISA::Decoder::basePC = 0
protected

◆ ByteTable

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

Definition at line 60 of file decoder.hh.

◆ chunkIdx

int gem5::X86ISA::Decoder::chunkIdx
protected

Definition at line 95 of file decoder.hh.

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

◆ decodePages

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

Definition at line 241 of file decoder.hh.

Referenced by doResetState(), and setM5Reg().

◆ defAddr

uint8_t gem5::X86ISA::Decoder::defAddr = 0
protected

Definition at line 110 of file decoder.hh.

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

◆ defOp

uint8_t gem5::X86ISA::Decoder::defOp = 0
protected

Definition at line 108 of file decoder.hh.

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

◆ displacementSize

int gem5::X86ISA::Decoder::displacementSize
protected

Definition at line 182 of file decoder.hh.

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

◆ dummy

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

Definition at line 90 of file decoder.hh.

◆ emi

ExtMachInst gem5::X86ISA::Decoder::emi
protected

◆ fetchChunk

MachInst gem5::X86ISA::Decoder::fetchChunk
protected

◆ immediateCollected

int gem5::X86ISA::Decoder::immediateCollected
protected

Definition at line 187 of file decoder.hh.

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

◆ immediateSize

int gem5::X86ISA::Decoder::immediateSize
protected

◆ ImmediateTypeOneByte

const Decoder::ByteTable gem5::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 68 of file decoder.hh.

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

◆ ImmediateTypeThreeByte0F38

const Decoder::ByteTable gem5::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 70 of file decoder.hh.

Referenced by doThreeByte0F38OpcodeState(), and doVexOpcodeState().

◆ ImmediateTypeThreeByte0F3A

const Decoder::ByteTable gem5::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, BY, BY, BY, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
BY, 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 , 0 ,
BY, BY, BY, 0 , 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 ,
BY, BY, 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 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 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 , 0 , 0 , 0 , 0
}

Definition at line 71 of file decoder.hh.

Referenced by doThreeByte0F3AOpcodeState(), and doVexOpcodeState().

◆ ImmediateTypeTwoByte

const Decoder::ByteTable gem5::X86ISA::Decoder::ImmediateTypeTwoByte
staticprivate
Initial value:
=
{
0 , 0 , 0 , 0 , WO, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 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 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
BY, BY, BY, BY, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
ZW, ZW, ZW, ZW, ZW, ZW, ZW, ZW, ZW, ZW, ZW, ZW, ZW, ZW, ZW, ZW,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , BY, 0 , 0 , 0 , 0 , 0 , 0 , 0 , BY, 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , BY, 0 , 0 , 0 , 0 , 0 ,
0 , 0 , BY, 0 , BY, 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 , 0 , 0 , 0 , 0 , 0 , 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 69 of file decoder.hh.

Referenced by doTwoByteOpcodeState(), and doVexOpcodeState().

◆ ImmediateTypeVex

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

Definition at line 72 of file decoder.hh.

◆ instBytes

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

Definition at line 94 of file decoder.hh.

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

◆ instCacheMap

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

Definition at line 248 of file decoder.hh.

Referenced by setM5Reg().

◆ instDone

bool gem5::X86ISA::Decoder::instDone = false
protected

◆ instMap

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

Definition at line 245 of file decoder.hh.

Referenced by decode(), and setM5Reg().

◆ microcodeRom

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

Definition at line 74 of file decoder.hh.

Referenced by fetchRomMicroop().

◆ mode

X86Mode gem5::X86ISA::Decoder::mode = LongMode
protected

Definition at line 105 of file decoder.hh.

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

◆ offset

int gem5::X86ISA::Decoder::offset = 0
protected

◆ origPC

Addr gem5::X86ISA::Decoder::origPC = 0
protected

Definition at line 99 of file decoder.hh.

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

◆ outOfBytes

bool gem5::X86ISA::Decoder::outOfBytes = true
protected

Definition at line 178 of file decoder.hh.

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

◆ Prefixes

const Decoder::ByteTable gem5::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 61 of file decoder.hh.

◆ SizeTypeToSize

const uint8_t gem5::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 59 of file decoder.hh.

Referenced by processOpcode().

◆ stack

uint8_t gem5::X86ISA::Decoder::stack = 0
protected

Definition at line 111 of file decoder.hh.

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

◆ state

State gem5::X86ISA::Decoder::state = ResetState
protected

Definition at line 210 of file decoder.hh.

Referenced by process(), and reset().

◆ submode

X86SubMode gem5::X86ISA::Decoder::submode = SixtyFourBitMode
protected

Definition at line 106 of file decoder.hh.

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

◆ UsesModRMOneByte

const Decoder::ByteTable gem5::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 63 of file decoder.hh.

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

◆ UsesModRMThreeByte0F38

const Decoder::ByteTable gem5::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 65 of file decoder.hh.

Referenced by doThreeByte0F38OpcodeState(), and doVexOpcodeState().

◆ UsesModRMThreeByte0F3A

const Decoder::ByteTable gem5::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 66 of file decoder.hh.

Referenced by doThreeByte0F3AOpcodeState(), and doVexOpcodeState().

◆ UsesModRMTwoByte

const Decoder::ByteTable gem5::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 , 1 , 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 64 of file decoder.hh.

Referenced by doTwoByteOpcodeState(), and doVexOpcodeState().


The documentation for this class was generated from the following files:
gem5::X86ISA::LO
const uint8_t LO
Definition: decoder_tables.cc:55
gem5::X86ISA::V2
const uint8_t V2
Definition: decoder_tables.cc:59
gem5::X86ISA::RN
const uint8_t RN
Definition: decoder_tables.cc:57
gem5::X86ISA::ES
const uint8_t ES
Definition: decoder_tables.cc:48
gem5::X86ISA::ZW
@ ZW
Definition: decoder_tables.cc:187
gem5::X86ISA::RE
const uint8_t RE
Definition: decoder_tables.cc:56
gem5::X86ISA::RX
const uint8_t RX
Definition: decoder_tables.cc:58
gem5::X86ISA::V3
const uint8_t V3
Definition: decoder_tables.cc:60
gem5::X86ISA::SS
const uint8_t SS
Definition: decoder_tables.cc:51
gem5::X86ISA::GS
const uint8_t GS
Definition: decoder_tables.cc:50
gem5::X86ISA::VW
@ VW
Definition: decoder_tables.cc:185
gem5::X86ISA::PO
@ PO
Definition: decoder_tables.cc:192
gem5::X86ISA::CS
const uint8_t CS
Definition: decoder_tables.cc:46
gem5::X86ISA::DS
const uint8_t DS
Definition: decoder_tables.cc:47
gem5::X86ISA::BY
@ BY
Definition: decoder_tables.cc:175
gem5::X86ISA::OO
const uint8_t OO
Definition: decoder_tables.cc:53
gem5::X86ISA::EN
@ EN
Definition: decoder_tables.cc:190
gem5::X86ISA::AO
const uint8_t AO
Definition: decoder_tables.cc:54
gem5::X86ISA::WO
@ WO
Definition: decoder_tables.cc:177
gem5::X86ISA::FS
const uint8_t FS
Definition: decoder_tables.cc:49

Generated on Tue Sep 21 2021 12:34:56 for gem5 by doxygen 1.8.17