gem5  v21.1.0.2
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
gem5::GenericISA::PCStateBase Class Reference

#include <types.hh>

Inheritance diagram for gem5::GenericISA::PCStateBase:
gem5::Serializable gem5::GenericISA::SimplePCState< InstWidth > gem5::GenericISA::SimplePCState< 4 > gem5::GenericISA::DelaySlotPCState< 4 > gem5::GenericISA::DelaySlotPCState< InstWidth > gem5::GenericISA::UPCState< InstWidth > gem5::GenericISA::UPCState< 4 > gem5::GenericISA::UPCState< 8 > gem5::PowerISA::PCState gem5::GenericISA::DelaySlotUPCState< InstWidth > gem5::RiscvISA::PCState gem5::X86ISA::PCState

Public Member Functions

Addr instAddr () const
 Returns the memory address the bytes of this instruction came from. More...
 
Addr nextInstAddr () const
 Returns the memory address the bytes of the next instruction came from. More...
 
MicroPC microPC () const
 Returns the current micropc. More...
 
void set (Addr val)
 Force this PC to reflect a particular value, resetting all its other fields around it. More...
 
bool operator== (const PCStateBase &opc) const
 
bool operator!= (const PCStateBase &opc) const
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
- 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. More...
 
void serializeSection (CheckpointOut &cp, const std::string &name) const
 
void unserializeSection (CheckpointIn &cp, const char *name)
 Unserialize an a child object. More...
 
void unserializeSection (CheckpointIn &cp, const std::string &name)
 

Protected Member Functions

 PCStateBase ()
 
 PCStateBase (Addr val)
 

Protected Attributes

Addr _pc
 
Addr _npc
 

Additional Inherited Members

- Static Public Member Functions inherited from gem5::Serializable
static const std::string & currentSection ()
 Gets the fully-qualified name of the active section. More...
 
static void generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream)
 Generate a checkpoint file so that the serialization can be routed to it. More...
 

Detailed Description

Definition at line 57 of file types.hh.

Constructor & Destructor Documentation

◆ PCStateBase() [1/2]

gem5::GenericISA::PCStateBase::PCStateBase ( )
inlineprotected

Definition at line 63 of file types.hh.

◆ PCStateBase() [2/2]

gem5::GenericISA::PCStateBase::PCStateBase ( Addr  val)
inlineprotected

Definition at line 64 of file types.hh.

References set(), and gem5::X86ISA::val.

Member Function Documentation

◆ instAddr()

Addr gem5::GenericISA::PCStateBase::instAddr ( ) const
inline

Returns the memory address the bytes of this instruction came from.

Returns
Memory address of the current instruction's encoding.

Definition at line 73 of file types.hh.

References _pc.

Referenced by gem5::RiscvISA::Decoder::decode(), gem5::PowerISA::Decoder::decode(), gem5::MipsISA::Decoder::decode(), gem5::SparcISA::Decoder::decode(), and gem5::DecoderFaultInst::execute().

◆ microPC()

MicroPC gem5::GenericISA::PCStateBase::microPC ( ) const
inline

Returns the current micropc.

Returns
The current micropc.

Definition at line 95 of file types.hh.

◆ nextInstAddr()

Addr gem5::GenericISA::PCStateBase::nextInstAddr ( ) const
inline

Returns the memory address the bytes of the next instruction came from.

Returns
Memory address of the next instruction's encoding.

Definition at line 84 of file types.hh.

References _npc.

◆ operator!=()

bool gem5::GenericISA::PCStateBase::operator!= ( const PCStateBase opc) const
inline

Definition at line 115 of file types.hh.

◆ operator==()

bool gem5::GenericISA::PCStateBase::operator== ( const PCStateBase opc) const
inline

Definition at line 109 of file types.hh.

References _npc, and _pc.

◆ serialize()

void gem5::GenericISA::PCStateBase::serialize ( CheckpointOut cp) const
inlineoverridevirtual

◆ set()

void gem5::GenericISA::PCStateBase::set ( Addr  val)

Force this PC to reflect a particular value, resetting all its other fields around it.

This is useful for in place (re)initialization.

Parameters
valThe value to set the PC to.

Referenced by PCStateBase().

◆ unserialize()

void gem5::GenericISA::PCStateBase::unserialize ( CheckpointIn cp)
inlineoverridevirtual

Member Data Documentation

◆ _npc

Addr gem5::GenericISA::PCStateBase::_npc
protected

◆ _pc

Addr gem5::GenericISA::PCStateBase::_pc
protected

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

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