gem5
v20.1.0.0
|
#include <types.hh>
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 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 Serializable | |
static const std::string & | currentSection () |
Gets the fully-qualified name of the active section. More... | |
static void | serializeAll (const std::string &cpt_dir) |
Serializes all the SimObjects. More... | |
static void | unserializeGlobals (CheckpointIn &cp) |
|
inlineprotected |
Definition at line 71 of file types.hh.
References set(), and X86ISA::val.
|
inline |
Returns the memory address the bytes of this instruction came from.
Definition at line 80 of file types.hh.
References _pc.
Referenced by RiscvISA::Decoder::decode(), MipsISA::Decoder::decode(), and SparcISA::Decoder::decode().
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineoverridevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
cp | Checkpoint state |
Implements Serializable.
Reimplemented in GenericISA::DelaySlotUPCState< MachInst >, GenericISA::DelaySlotPCState< MachInst >, GenericISA::UPCState< MachInst >, and X86ISA::PCState.
Definition at line 128 of file types.hh.
References _npc, _pc, and SERIALIZE_SCALAR.
Referenced by GenericISA::UPCState< MachInst >::serialize(), and GenericISA::DelaySlotPCState< MachInst >::serialize().
void 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.
val | The value to set the PC to. |
Referenced by PCStateBase().
|
inlineoverridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
cp | Checkpoint state |
Implements Serializable.
Reimplemented in GenericISA::DelaySlotUPCState< MachInst >, GenericISA::DelaySlotPCState< MachInst >, GenericISA::UPCState< MachInst >, and X86ISA::PCState.
Definition at line 135 of file types.hh.
References _npc, _pc, and UNSERIALIZE_SCALAR.
Referenced by GenericISA::UPCState< MachInst >::unserialize(), and GenericISA::DelaySlotPCState< MachInst >::unserialize().
|
protected |
Definition at line 68 of file types.hh.
Referenced by GenericISA::SimplePCState< MachInst >::advance(), GenericISA::DelaySlotPCState< MachInst >::advance(), nextInstAddr(), GenericISA::SimplePCState< MachInst >::npc(), operator==(), GenericISA::UPCState< MachInst >::operator==(), GenericISA::DelaySlotPCState< MachInst >::operator==(), GenericISA::DelaySlotUPCState< MachInst >::operator==(), serialize(), and unserialize().
|
protected |
Definition at line 67 of file types.hh.
Referenced by GenericISA::SimplePCState< MachInst >::advance(), GenericISA::DelaySlotPCState< MachInst >::advance(), instAddr(), operator==(), GenericISA::UPCState< MachInst >::operator==(), GenericISA::DelaySlotPCState< MachInst >::operator==(), GenericISA::DelaySlotUPCState< MachInst >::operator==(), GenericISA::SimplePCState< MachInst >::pc(), serialize(), and unserialize().