gem5  v21.1.0.2
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
gem5::SparcISA::Decoder Class Reference

#include <decoder.hh>

Inheritance diagram for gem5::SparcISA::Decoder:
gem5::InstDecoder

Public Member Functions

 Decoder (ISA *isa=nullptr)
 
void process ()
 
void reset ()
 
void moreBytes (const PCState &pc, Addr fetchPC)
 
bool needMoreBytes ()
 
bool instReady ()
 
void setContext (RegVal _asi)
 
void takeOverFrom (Decoder *old)
 
StaticInstPtr decode (SparcISA::PCState &nextPC)
 
- Public Member Functions inherited from gem5::InstDecoder
template<typename MoreBytesType >
 InstDecoder (MoreBytesType *mb_buf)
 
virtual StaticInstPtr fetchRomMicroop (MicroPC micropc, StaticInstPtr curMacroop)
 
void * moreBytesPtr () const
 
size_t moreBytesSize () const
 
Addr pcMask () const
 

Protected Member Functions

StaticInstPtr decodeInst (ExtMachInst mach_inst)
 
StaticInstPtr decode (ExtMachInst mach_inst, Addr addr)
 Decode a machine instruction. More...
 

Protected Attributes

ExtMachInst emi
 
uint32_t machInst
 
bool instDone
 
RegVal asi
 
- Protected Attributes inherited from gem5::InstDecoder
void * _moreBytesPtr
 
size_t _moreBytesSize
 
Addr _pcMask
 

Static Protected Attributes

static GenericISA::BasicDecodeCache< Decoder, ExtMachInstdefaultCache
 A cache of decoded instruction objects. More...
 

Friends

class GenericISA::BasicDecodeCache< Decoder, ExtMachInst >
 

Detailed Description

Definition at line 45 of file decoder.hh.

Constructor & Destructor Documentation

◆ Decoder()

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

Definition at line 55 of file decoder.hh.

Member Function Documentation

◆ decode() [1/2]

StaticInstPtr gem5::SparcISA::Decoder::decode ( ExtMachInst  mach_inst,
Addr  addr 
)
inlineprotected

Decode a machine instruction.

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

Definition at line 117 of file decoder.hh.

References gem5::X86ISA::addr, defaultCache, DPRINTF, and gem5::ArmISA::si.

Referenced by decode().

◆ decode() [2/2]

StaticInstPtr gem5::SparcISA::Decoder::decode ( SparcISA::PCState nextPC)
inline

Definition at line 127 of file decoder.hh.

References decode(), emi, gem5::GenericISA::PCStateBase::instAddr(), and instDone.

◆ decodeInst()

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

◆ instReady()

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

Definition at line 93 of file decoder.hh.

References instDone.

◆ moreBytes()

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

Definition at line 69 of file decoder.hh.

References asi, gem5::betoh(), gem5::bits(), emi, instDone, and machInst.

◆ needMoreBytes()

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

Definition at line 87 of file decoder.hh.

◆ process()

void gem5::SparcISA::Decoder::process ( )
inline

Definition at line 58 of file decoder.hh.

◆ reset()

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

Definition at line 61 of file decoder.hh.

References instDone.

◆ setContext()

void gem5::SparcISA::Decoder::setContext ( RegVal  _asi)
inline

Definition at line 99 of file decoder.hh.

References asi.

◆ takeOverFrom()

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

Definition at line 104 of file decoder.hh.

Friends And Related Function Documentation

◆ GenericISA::BasicDecodeCache< Decoder, ExtMachInst >

Definition at line 109 of file decoder.hh.

Member Data Documentation

◆ asi

RegVal gem5::SparcISA::Decoder::asi
protected

Definition at line 52 of file decoder.hh.

Referenced by moreBytes(), and setContext().

◆ defaultCache

GenericISA::BasicDecodeCache< Decoder, ExtMachInst > gem5::SparcISA::Decoder::defaultCache
staticprotected

A cache of decoded instruction objects.

Definition at line 108 of file decoder.hh.

Referenced by decode().

◆ emi

ExtMachInst gem5::SparcISA::Decoder::emi
protected

Definition at line 49 of file decoder.hh.

Referenced by decode(), and moreBytes().

◆ instDone

bool gem5::SparcISA::Decoder::instDone
protected

Definition at line 51 of file decoder.hh.

Referenced by decode(), instReady(), moreBytes(), and reset().

◆ machInst

uint32_t gem5::SparcISA::Decoder::machInst
protected

Definition at line 50 of file decoder.hh.

Referenced by moreBytes().


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

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