gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Types | Static Private Attributes | List of all members
X86ISA::Decoder Class Reference

#include <decoder.hh>

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)
 

Protected Types

enum  State {
  ResetState, FromCacheState, PrefixState, Vex2Of2State,
  Vex2Of3State, Vex3Of3State, VexOpcodeState, OneByteOpcodeState,
  TwoByteOpcodeState, ThreeByte0F38OpcodeState, ThreeByte0F3AOpcodeState, ModRMState,
  SIBState, DisplacementState, ImmediateState, ErrorState
}
 
typedef MiscReg CacheKey
 Caching for decoded instruction objects. More...
 
typedef DecodeCache::AddrMap
< Decoder::InstBytes
DecodePages
 
typedef std::unordered_map
< CacheKey, DecodePages * > 
AddrCacheMap
 
typedef std::unordered_map
< CacheKey,
DecodeCache::InstMap * > 
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
 
int chunkIdx
 
Addr basePC
 
Addr origPC
 
int offset
 
ExtMachInst emi
 
X86Mode mode
 
X86SubMode submode
 
uint8_t altOp
 
uint8_t defOp
 
uint8_t altAddr
 
uint8_t defAddr
 
uint8_t stack
 
bool outOfBytes
 
bool instDone
 
int displacementSize
 
int immediateSize
 
int immediateCollected
 
State state
 
DecodePagesdecodePages
 
AddrCacheMap addrCacheMap
 
DecodeCache::InstMapinstMap
 

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
 
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]
 

Detailed Description

Definition at line 52 of file decoder.hh.

Member Typedef Documentation

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

Definition at line 229 of file decoder.hh.

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

Definition at line 57 of file decoder.hh.

Caching for decoded instruction objects.

Definition at line 225 of file decoder.hh.

Definition at line 227 of file decoder.hh.

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

Definition at line 233 of file decoder.hh.

Member Enumeration Documentation

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

Constructor & Destructor Documentation

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

Member Function Documentation

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

Definition at line 157 of file decoder.hh.

References offset, and updateOffsetState().

Referenced by getImmediate().

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 681 of file decoder.cc.

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

Referenced by decode().

StaticInstPtr X86ISA::Decoder::decode ( X86ISA::PCState nextPC)
StaticInstPtr X86ISA::Decoder::decodeInst ( ExtMachInst  mach_inst)

Referenced by decode().

Decoder::State X86ISA::Decoder::doDisplacementState ( )
protected
Decoder::State X86ISA::Decoder::doFromCacheState ( )
protected
Decoder::State X86ISA::Decoder::doImmediateState ( )
protected
Decoder::State X86ISA::Decoder::doModRMState ( uint8_t  nextByte)
protected
Decoder::State X86ISA::Decoder::doOneByteOpcodeState ( uint8_t  nextByte)
protected
Decoder::State X86ISA::Decoder::doPrefixState ( uint8_t  nextByte)
protected
Decoder::State X86ISA::Decoder::doResetState ( )
protected
Decoder::State X86ISA::Decoder::doSIBState ( uint8_t  nextByte)
protected
Decoder::State X86ISA::Decoder::doThreeByte0F38OpcodeState ( uint8_t  nextByte)
protected
Decoder::State X86ISA::Decoder::doThreeByte0F3AOpcodeState ( uint8_t  nextByte)
protected
Decoder::State X86ISA::Decoder::doTwoByteOpcodeState ( uint8_t  nextByte)
protected
Decoder::State X86ISA::Decoder::doVex2Of2State ( uint8_t  nextByte)
protected
Decoder::State X86ISA::Decoder::doVex2Of3State ( uint8_t  nextByte)
protected
Decoder::State X86ISA::Decoder::doVex3Of3State ( uint8_t  nextByte)
protected
Decoder::State X86ISA::Decoder::doVexOpcodeState ( uint8_t  nextByte)
protected
void X86ISA::Decoder::getImmediate ( int &  collected,
uint64_t &  current,
int  size 
)
inlineprotected

Definition at line 111 of file decoder.hh.

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

Referenced by doDisplacementState(), and doImmediateState().

uint8_t X86ISA::Decoder::getNextByte ( )
inlineprotected

Definition at line 106 of file decoder.hh.

References fetchChunk, and offset.

Referenced by process().

bool X86ISA::Decoder::instReady ( )
inline

Definition at line 322 of file decoder.hh.

References instDone.

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

Definition at line 317 of file decoder.hh.

References outOfBytes.

void X86ISA::Decoder::process ( )
State X86ISA::Decoder::processExtendedOpcode ( ByteTable immTable)
protected
Decoder::State X86ISA::Decoder::processOpcode ( ByteTable immTable,
ByteTable modrmTable,
bool  addrSizedImm = false 
)
protected
void X86ISA::Decoder::reset ( )
inline

Definition at line 298 of file decoder.hh.

References ResetState, and state.

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

Definition at line 285 of file decoder.hh.

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

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

Member Data Documentation

AddrCacheMap X86ISA::Decoder::addrCacheMap
protected

Definition at line 230 of file decoder.hh.

Referenced by setM5Reg().

uint8_t X86ISA::Decoder::altAddr
protected

Definition at line 102 of file decoder.hh.

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

uint8_t X86ISA::Decoder::altOp
protected

Definition at line 100 of file decoder.hh.

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

Addr X86ISA::Decoder::basePC
protected
int X86ISA::Decoder::chunkIdx
protected

Definition at line 88 of file decoder.hh.

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

DecodePages* X86ISA::Decoder::decodePages
protected

Definition at line 228 of file decoder.hh.

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

uint8_t X86ISA::Decoder::defAddr
protected

Definition at line 103 of file decoder.hh.

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

uint8_t X86ISA::Decoder::defOp
protected

Definition at line 101 of file decoder.hh.

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

int X86ISA::Decoder::displacementSize
protected

Definition at line 170 of file decoder.hh.

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

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

Definition at line 83 of file decoder.hh.

Referenced by Decoder().

ExtMachInst X86ISA::Decoder::emi
protected
MachInst X86ISA::Decoder::fetchChunk
protected
int X86ISA::Decoder::immediateCollected
protected

Definition at line 175 of file decoder.hh.

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

int X86ISA::Decoder::immediateSize
protected
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().

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().

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, BY, BY, BY, 0 , 0 , 0 , 0 , 0 , 0 , 0 ,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der.hh.

Referenced by doTwoByteOpcodeState(), and doVexOpcodeState().

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

Definition at line 69 of file decoder.hh.

InstBytes* X86ISA::Decoder::instBytes
protected

Definition at line 87 of file decoder.hh.

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

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

Definition at line 234 of file decoder.hh.

Referenced by setM5Reg().

bool X86ISA::Decoder::instDone
protected
DecodeCache::InstMap* X86ISA::Decoder::instMap
protected

Definition at line 232 of file decoder.hh.

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

X86Mode X86ISA::Decoder::mode
protected

Definition at line 98 of file decoder.hh.

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

int X86ISA::Decoder::offset
protected
Addr X86ISA::Decoder::origPC
protected

Definition at line 92 of file decoder.hh.

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

bool X86ISA::Decoder::outOfBytes
protected

Definition at line 166 of file decoder.hh.

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

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.

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().

uint8_t X86ISA::Decoder::stack
protected

Definition at line 104 of file decoder.hh.

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

State X86ISA::Decoder::state
protected

Definition at line 197 of file decoder.hh.

Referenced by process(), and reset().

X86SubMode X86ISA::Decoder::submode
protected

Definition at line 99 of file decoder.hh.

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

const Decoder::ByteTable X86ISA::Decoder::UsesModRMOneByte
staticprivate
Initial value:
=
{
1 , 1 , 1 ,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, 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().

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 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 , 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:

Generated on Fri Jun 9 2017 13:04:41 for gem5 by doxygen 1.8.6