gem5  v21.1.0.2
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
gem5::MipsISA::Decoder Class Reference

#include <decoder.hh>

Inheritance diagram for gem5::MipsISA::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 takeOverFrom (Decoder *old)
 
StaticInstPtr decode (MipsISA::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
 
- 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 47 of file decoder.hh.

Constructor & Destructor Documentation

◆ Decoder()

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

Definition at line 56 of file decoder.hh.

Member Function Documentation

◆ decode() [1/2]

StaticInstPtr gem5::MipsISA::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 104 of file decoder.hh.

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

Referenced by decode().

◆ decode() [2/2]

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

Definition at line 114 of file decoder.hh.

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

◆ decodeInst()

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

◆ instReady()

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

Definition at line 86 of file decoder.hh.

References instDone.

◆ moreBytes()

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

Definition at line 73 of file decoder.hh.

References emi, instDone, gem5::letoh(), and machInst.

◆ needMoreBytes()

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

Definition at line 80 of file decoder.hh.

◆ process()

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

Definition at line 60 of file decoder.hh.

◆ reset()

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

Definition at line 65 of file decoder.hh.

References instDone.

◆ takeOverFrom()

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

Definition at line 91 of file decoder.hh.

Friends And Related Function Documentation

◆ GenericISA::BasicDecodeCache< Decoder, ExtMachInst >

Definition at line 96 of file decoder.hh.

Member Data Documentation

◆ defaultCache

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

A cache of decoded instruction objects.

Definition at line 95 of file decoder.hh.

Referenced by decode().

◆ emi

ExtMachInst gem5::MipsISA::Decoder::emi
protected

Definition at line 51 of file decoder.hh.

Referenced by decode(), and moreBytes().

◆ instDone

bool gem5::MipsISA::Decoder::instDone
protected

Definition at line 53 of file decoder.hh.

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

◆ machInst

uint32_t gem5::MipsISA::Decoder::machInst
protected

Definition at line 52 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:31:37 for gem5 by doxygen 1.8.17