gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::X86ISA::Decoder Class Reference

#include <decoder.hh>

Inheritance diagram for gem5::X86ISA::Decoder:
gem5::InstDecoder gem5::SimObject gem5::EventManager gem5::Serializable gem5::Drainable gem5::statistics::Group gem5::Named

Classes

struct  InstBytes
 

Public Member Functions

 Decoder (const X86DecoderParams &p)
 
void setM5Reg (HandyM5Reg m5Reg)
 
void takeOverFrom (InstDecoder *old) override
 Take over the state from an old decoder when switching CPUs.
 
void reset () override
 
void moreBytes (const PCStateBase &pc, Addr fetchPC) override
 Feed data to the decoder.
 
void updateNPC (X86ISA::PCState &nextPC)
 
StaticInstPtr decode (PCStateBase &next_pc) override
 Decode an instruction or fetch it from the code cache.
 
StaticInstPtr fetchRomMicroop (MicroPC micropc, StaticInstPtr curMacroop) override
 
- Public Member Functions inherited from gem5::InstDecoder
template<typename MoreBytesType >
 InstDecoder (const InstDecoderParams &params, MoreBytesType *mb_buf)
 
template<class Type >
Type & as ()
 
template<class Type >
const Type & as () const
 
void * moreBytesPtr () const
 
size_t moreBytesSize () const
 
Addr pcMask () const
 
bool instReady () const
 Is an instruction ready to be decoded?
 
bool needMoreBytes () const
 Can the decoder accept more data?
 
- Public Member Functions inherited from gem5::SimObject
const Paramsparams () const
 
 SimObject (const Params &p)
 
virtual ~SimObject ()
 
virtual void init ()
 init() is called after all C++ SimObjects have been created and all ports are connected.
 
virtual void loadState (CheckpointIn &cp)
 loadState() is called on each SimObject when restoring from a checkpoint.
 
virtual void initState ()
 initState() is called on each SimObject when not restoring from a checkpoint.
 
virtual void regProbePoints ()
 Register probe points for this object.
 
virtual void regProbeListeners ()
 Register probe listeners for this object.
 
ProbeManagergetProbeManager ()
 Get the probe manager for this object.
 
virtual PortgetPort (const std::string &if_name, PortID idx=InvalidPortID)
 Get a port with a given name and index.
 
virtual void startup ()
 startup() is the final initialization call before simulation.
 
DrainState drain () override
 Provide a default implementation of the drain interface for objects that don't need draining.
 
virtual void memWriteback ()
 Write back dirty buffers to memory using functional writes.
 
virtual void memInvalidate ()
 Invalidate the contents of memory buffers.
 
void serialize (CheckpointOut &cp) const override
 Serialize an object.
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object.
 
- Public Member Functions inherited from gem5::EventManager
EventQueueeventQueue () const
 
void schedule (Event &event, Tick when)
 
void deschedule (Event &event)
 
void reschedule (Event &event, Tick when, bool always=false)
 
void schedule (Event *event, Tick when)
 
void deschedule (Event *event)
 
void reschedule (Event *event, Tick when, bool always=false)
 
void wakeupEventQueue (Tick when=(Tick) -1)
 This function is not needed by the usual gem5 event loop but may be necessary in derived EventQueues which host gem5 on other schedulers.
 
void setCurTick (Tick newVal)
 
 EventManager (EventManager &em)
 Event manger manages events in the event queue.
 
 EventManager (EventManager *em)
 
 EventManager (EventQueue *eq)
 
- Public Member Functions inherited from gem5::Serializable
 Serializable ()
 
virtual ~Serializable ()
 
void serializeSection (CheckpointOut &cp, const char *name) const
 Serialize an object into a new section.
 
void serializeSection (CheckpointOut &cp, const std::string &name) const
 
void unserializeSection (CheckpointIn &cp, const char *name)
 Unserialize an a child object.
 
void unserializeSection (CheckpointIn &cp, const std::string &name)
 
- Public Member Functions inherited from gem5::Drainable
DrainState drainState () const
 Return the current drain state of an object.
 
virtual void notifyFork ()
 Notify a child process of a fork.
 
- Public Member Functions inherited from gem5::statistics::Group
 Group (Group *parent, const char *name=nullptr)
 Construct a new statistics group.
 
virtual ~Group ()
 
virtual void regStats ()
 Callback to set stat parameters.
 
virtual void resetStats ()
 Callback to reset stats.
 
virtual void preDumpStats ()
 Callback before stats are dumped.
 
void addStat (statistics::Info *info)
 Register a stat with this group.
 
const std::map< std::string, Group * > & getStatGroups () const
 Get all child groups associated with this object.
 
const std::vector< Info * > & getStats () const
 Get all stats associated with this object.
 
void addStatGroup (const char *name, Group *block)
 Add a stat block as a child of this block.
 
const InforesolveStat (std::string name) const
 Resolve a stat by its name within this group.
 
void mergeStatGroup (Group *block)
 Merge the contents (stats & children) of a block to this block.
 
 Group ()=delete
 
 Group (const Group &)=delete
 
Groupoperator= (const Group &)=delete
 
- Public Member Functions inherited from gem5::Named
 Named (const std::string &name_)
 
virtual ~Named ()=default
 
virtual std::string name () 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.
 
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.
 
void process ()
 
- Protected Member Functions inherited from gem5::Drainable
 Drainable ()
 
virtual ~Drainable ()
 
virtual void drainResume ()
 Resume execution after a successful drain.
 
void signalDrainDone () const
 Signal that an object is drained.
 

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
 
uint8_t cpl = 0
 
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
 
bool instDone = false
 
bool outOfBytes = true
 
- Protected Attributes inherited from gem5::SimObject
const SimObjectParams & _params
 Cached copy of the object parameters.
 
- Protected Attributes inherited from gem5::EventManager
EventQueueeventq
 A pointer to this object's event queue.
 

Static Protected Attributes

static InstBytes dummy
 
static InstCacheMap instCacheMap
 

Private Types

typedef const uint8_t ByteTable[256]
 

Static Private Attributes

static const uint8_t SizeTypeToSize [3][10]
 
static ByteTable Prefixes [2]
 
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 X86ISAInst::MicrocodeRom microcodeRom
 

Additional Inherited Members

- Public Types inherited from gem5::SimObject
typedef SimObjectParams Params
 
- Static Public Member Functions inherited from gem5::SimObject
static void serializeAll (const std::string &cpt_dir)
 Create a checkpoint by serializing all SimObjects in the system.
 
static SimObjectfind (const char *name)
 Find the SimObject with the given name and return a pointer to it.
 
static void setSimObjectResolver (SimObjectResolver *resolver)
 There is a single object name resolver, and it is only set when simulation is restoring from checkpoints.
 
static SimObjectResolvergetSimObjectResolver ()
 There is a single object name resolver, and it is only set when simulation is restoring from checkpoints.
 
- Static Public Member Functions inherited from gem5::Serializable
static const std::string & currentSection ()
 Gets the fully-qualified name of the active section.
 
static void generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream)
 Generate a checkpoint file so that the serialization can be routed to it.
 

Detailed Description

Definition at line 57 of file decoder.hh.

Member Typedef Documentation

◆ AddrCacheMap

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

Definition at line 241 of file decoder.hh.

◆ ByteTable

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

Definition at line 62 of file decoder.hh.

◆ CacheKey

Caching for decoded instruction objects.

Definition at line 237 of file decoder.hh.

◆ DecodePages

◆ InstCacheMap

Definition at line 246 of file decoder.hh.

◆ MachInst

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

Definition at line 78 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 188 of file decoder.hh.

Constructor & Destructor Documentation

◆ Decoder()

gem5::X86ISA::Decoder::Decoder ( const X86DecoderParams & p)
inline

Member Function Documentation

◆ consumeByte()

◆ consumeBytes()

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

Definition at line 172 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 678 of file decoder.cc.

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

Referenced by decode().

◆ decode() [2/2]

StaticInstPtr gem5::X86ISA::Decoder::decode ( PCStateBase & pc)
overridevirtual

Decode an instruction or fetch it from the code cache.

This method decodes the currently pending pre-decoded instruction. Data must be fed to the decoder using moreBytes() until instReady() is true before calling this method.

Parameters
pcInstruction pointer that we are decoding.
Returns
A pointer to a static instruction or NULL if the decoder isn't ready (see instReady()).

Implements gem5::InstDecoder.

Definition at line 698 of file decoder.cc.

References gem5::PCStateBase::as(), basePC, gem5::X86ISA::Decoder::InstBytes::chunks, decode(), emi, instBytes, gem5::InstDecoder::instDone, gem5::X86ISA::Decoder::InstBytes::lastOffset, gem5::X86ISA::mask, gem5::X86ISA::Decoder::InstBytes::masks, offset, origPC, gem5::X86ISA::Decoder::InstBytes::si, gem5::X86ISA::si, and updateNPC().

◆ decodeInst()

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

Referenced by decode().

◆ doDisplacementState()

◆ doFromCacheState()

◆ doImmediateState()

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

◆ doModRMState()

◆ doOneByteOpcodeState()

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

◆ doPrefixState()

◆ doResetState()

◆ doSIBState()

◆ doThreeByte0F38OpcodeState()

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

◆ doThreeByte0F3AOpcodeState()

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

◆ doTwoByteOpcodeState()

◆ doVex2Of2State()

◆ doVex2Of3State()

◆ doVex3Of3State()

◆ doVexOpcodeState()

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

References fetchChunk, and offset.

Referenced by process().

◆ moreBytes()

void gem5::X86ISA::Decoder::moreBytes ( const PCStateBase & pc,
Addr fetchPC )
inlineoverridevirtual

Feed data to the decoder.

A CPU model uses this interface to load instruction data into the decoder. Once enough data has been loaded (check with instReady()), a decoded instruction can be retrieved using decode(PCStateBase &).

This method is intended to support both fixed-length and variable-length instructions. Instruction data is fetch in MachInst blocks (which correspond to the size of a typical insturction). The method might need to be called multiple times if the instruction spans multiple blocks, in that case needMoreBytes() will return true and instReady() will return false.

The fetchPC parameter is used to indicate where in memory the instruction was fetched from. This is should be the same address as the pc. If fetching multiple blocks, it indicates where subsequent blocks are fetched from (pc + n * sizeof(MachInst)).

Parameters
pcInstruction pointer that we are decoding.
fetchPCThe address this chunk was fetched from.

Implements gem5::InstDecoder.

Definition at line 330 of file decoder.hh.

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

◆ process()

◆ processExtendedOpcode()

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

◆ processOpcode()

◆ reset()

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

Reimplemented from gem5::InstDecoder.

Definition at line 321 of file decoder.hh.

References gem5::InstDecoder::reset(), ResetState, and state.

◆ setM5Reg()

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

◆ takeOverFrom()

void gem5::X86ISA::Decoder::takeOverFrom ( InstDecoder * old)
inlineoverridevirtual

Take over the state from an old decoder when switching CPUs.

Parameters
oldDecoder used in old CPU

Reimplemented from gem5::InstDecoder.

Definition at line 300 of file decoder.hh.

References altAddr, altOp, cpl, defAddr, defOp, emi, mode, gem5::X86ISA::ExtMachInst::mode, stack, submode, and gem5::InstDecoder::takeOverFrom().

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

Referenced by setM5Reg().

◆ altAddr

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

Definition at line 110 of file decoder.hh.

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

◆ altOp

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

Definition at line 108 of file decoder.hh.

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

◆ basePC

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

◆ chunkIdx

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

Definition at line 96 of file decoder.hh.

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

◆ cpl

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

Definition at line 114 of file decoder.hh.

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

◆ decodePages

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

Definition at line 240 of file decoder.hh.

Referenced by doResetState(), and setM5Reg().

◆ defAddr

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

Definition at line 111 of file decoder.hh.

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

◆ defOp

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

Definition at line 109 of file decoder.hh.

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

◆ displacementSize

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

Definition at line 181 of file decoder.hh.

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

◆ dummy

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

Definition at line 91 of file decoder.hh.

◆ emi

◆ fetchChunk

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

◆ immediateCollected

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

Definition at line 186 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 , PO, 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 70 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 72 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 73 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 71 of file decoder.hh.

Referenced by doTwoByteOpcodeState(), and doVexOpcodeState().

◆ instBytes

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

Definition at line 95 of file decoder.hh.

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

◆ instCacheMap

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

Definition at line 247 of file decoder.hh.

Referenced by setM5Reg().

◆ instMap

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

Definition at line 244 of file decoder.hh.

Referenced by decode(), and setM5Reg().

◆ microcodeRom

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

Definition at line 75 of file decoder.hh.

Referenced by fetchRomMicroop().

◆ mode

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

Definition at line 106 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 100 of file decoder.hh.

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

◆ Prefixes

const Decoder::ByteTable gem5::X86ISA::Decoder::Prefixes
staticprivate

Definition at line 63 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 61 of file decoder.hh.

Referenced by processOpcode().

◆ stack

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

Definition at line 112 of file decoder.hh.

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

◆ state

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

Definition at line 209 of file decoder.hh.

Referenced by process(), and reset().

◆ submode

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

Definition at line 107 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 65 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 67 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 , 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1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0
}

Definition at line 66 of file decoder.hh.

Referenced by doTwoByteOpcodeState(), and doVexOpcodeState().


The documentation for this class was generated from the following files:

Generated on Tue Jun 18 2024 16:24:54 for gem5 by doxygen 1.11.0