gem5 v24.0.0.0
|
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate the state of the CPU model. More...
#include <exec_context.hh>
Public Member Functions | |
virtual RegVal | getRegOperand (const StaticInst *si, int idx)=0 |
virtual void | getRegOperand (const StaticInst *si, int idx, void *val)=0 |
virtual void * | getWritableRegOperand (const StaticInst *si, int idx)=0 |
virtual void | setRegOperand (const StaticInst *si, int idx, RegVal val)=0 |
virtual void | setRegOperand (const StaticInst *si, int idx, const void *val)=0 |
virtual ThreadContext * | tcBase () const =0 |
Returns a pointer to the ThreadContext. | |
Misc Register Interfaces | |
virtual RegVal | readMiscRegOperand (const StaticInst *si, int idx)=0 |
virtual void | setMiscRegOperand (const StaticInst *si, int idx, RegVal val)=0 |
virtual RegVal | readMiscReg (int misc_reg)=0 |
Reads a miscellaneous register, handling any architectural side effects due to reading that register. | |
virtual void | setMiscReg (int misc_reg, RegVal val)=0 |
Sets a miscellaneous register, handling any architectural side effects due to writing that register. | |
PC Control | |
virtual const PCStateBase & | pcState () const =0 |
virtual void | pcState (const PCStateBase &val)=0 |
Memory Interface | |
virtual Fault | readMem (Addr addr, uint8_t *data, unsigned int size, Request::Flags flags, const std::vector< bool > &byte_enable) |
Perform an atomic memory read operation. | |
virtual Fault | initiateMemRead (Addr addr, unsigned int size, Request::Flags flags, const std::vector< bool > &byte_enable) |
Initiate a timing memory read operation. | |
virtual Fault | initiateMemMgmtCmd (Request::Flags flags)=0 |
Initiate a memory management command with no valid address. | |
virtual Fault | writeMem (uint8_t *data, unsigned int size, Addr addr, Request::Flags flags, uint64_t *res, const std::vector< bool > &byte_enable)=0 |
For atomic-mode contexts, perform an atomic memory write operation. | |
virtual Fault | amoMem (Addr addr, uint8_t *data, unsigned int size, Request::Flags flags, AtomicOpFunctorPtr amo_op) |
For atomic-mode contexts, perform an atomic AMO (a.k.a., Atomic Read-Modify-Write Memory Operation) | |
virtual Fault | initiateMemAMO (Addr addr, unsigned int size, Request::Flags flags, AtomicOpFunctorPtr amo_op) |
For timing-mode contexts, initiate an atomic AMO (atomic read-modify-write memory operation) | |
virtual void | setStCondFailures (unsigned int sc_failures)=0 |
Sets the number of consecutive store conditional failures. | |
virtual unsigned int | readStCondFailures () const =0 |
Returns the number of consecutive store conditional failures. | |
ARM-Specific Interfaces | |
virtual bool | readPredicate () const =0 |
virtual void | setPredicate (bool val)=0 |
virtual bool | readMemAccPredicate () const =0 |
virtual void | setMemAccPredicate (bool val)=0 |
virtual uint64_t | newHtmTransactionUid () const =0 |
virtual uint64_t | getHtmTransactionUid () const =0 |
virtual bool | inHtmTransactionalState () const =0 |
virtual uint64_t | getHtmTransactionalDepth () const =0 |
X86-Specific Interfaces | |
virtual void | demapPage (Addr vaddr, uint64_t asn)=0 |
Invalidate a page in the DTLB and ITLB. | |
virtual void | armMonitor (Addr address)=0 |
virtual bool | mwait (PacketPtr pkt)=0 |
virtual void | mwaitAtomic (ThreadContext *tc)=0 |
virtual AddressMonitor * | getAddrMonitor ()=0 |
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate the state of the CPU model.
Register accessor methods in this class typically provide the index of the instruction's operand (e.g., 0 or 1), not the architectural register index, to simplify the implementation of register renaming. The architectural register index can be found by indexing into the instruction's own operand index table.
Definition at line 71 of file exec_context.hh.
|
inlinevirtual |
For atomic-mode contexts, perform an atomic AMO (a.k.a., Atomic Read-Modify-Write Memory Operation)
Reimplemented in gem5::SimpleExecContext.
Definition at line 166 of file exec_context.hh.
References panic.
|
pure virtual |
Implemented in gem5::CheckerCPU, gem5::minor::ExecContext, gem5::o3::DynInst, and gem5::SimpleExecContext.
|
pure virtual |
Invalidate a page in the DTLB and ITLB.
Implemented in gem5::CheckerCPU, gem5::minor::ExecContext, gem5::o3::DynInst, and gem5::SimpleExecContext.
|
pure virtual |
Implemented in gem5::CheckerCPU, gem5::minor::ExecContext, gem5::o3::DynInst, and gem5::SimpleExecContext.
|
pure virtual |
Implemented in gem5::CheckerCPU, gem5::minor::ExecContext, gem5::o3::DynInst, and gem5::SimpleExecContext.
|
pure virtual |
Implemented in gem5::CheckerCPU, gem5::minor::ExecContext, gem5::o3::DynInst, and gem5::SimpleExecContext.
|
pure virtual |
|
pure virtual |
Implemented in gem5::CheckerCPU, gem5::minor::ExecContext, gem5::o3::DynInst, and gem5::SimpleExecContext.
|
pure virtual |
|
pure virtual |
Implemented in gem5::CheckerCPU, gem5::minor::ExecContext, gem5::o3::DynInst, and gem5::SimpleExecContext.
|
inlinevirtual |
For timing-mode contexts, initiate an atomic AMO (atomic read-modify-write memory operation)
Reimplemented in gem5::minor::ExecContext, and gem5::SimpleExecContext.
Definition at line 177 of file exec_context.hh.
References panic.
|
pure virtual |
Initiate a memory management command with no valid address.
Currently, these instructions need to bypass squashing in the O3 model Examples include HTM commands and TLBI commands. e.g. tell Ruby we're starting/stopping a HTM transaction, or tell Ruby to issue a TLBI operation
Implemented in gem5::CheckerCPU, gem5::minor::ExecContext, gem5::o3::DynInst, and gem5::SimpleExecContext.
|
inlinevirtual |
Initiate a timing memory read operation.
Must be overridden for exec contexts that support timing memory mode. Not pure virtual since exec contexts that only support atomic memory mode need not override (though in that case this function should never be called).
Reimplemented in gem5::minor::ExecContext, and gem5::SimpleExecContext.
Definition at line 138 of file exec_context.hh.
References panic.
Referenced by gem5::X86ISA::initiateMemRead().
|
pure virtual |
Implemented in gem5::CheckerCPU, gem5::minor::ExecContext, gem5::o3::DynInst, and gem5::SimpleExecContext.
|
pure virtual |
Implemented in gem5::CheckerCPU, gem5::minor::ExecContext, gem5::o3::DynInst, and gem5::SimpleExecContext.
|
pure virtual |
Implemented in gem5::CheckerCPU, gem5::minor::ExecContext, gem5::o3::DynInst, and gem5::SimpleExecContext.
|
pure virtual |
Implemented in gem5::CheckerCPU, gem5::minor::ExecContext, gem5::o3::DynInst, and gem5::SimpleExecContext.
Referenced by gem5::DebugStep::execute(), gem5::DecoderFaultInst::execute(), gem5::RiscvISA::VlFFTrimVlMicroOp::execute(), gem5::RiscvISA::SystemOp::executeEBreakOrSemihosting(), gem5::RiscvSemihosting::isSemihostingEBreak(), gem5::ArmISA::ArmStaticInst::readPC(), gem5::ArmISA::ArmStaticInst::setAIWNextPC(), gem5::ArmISA::ArmStaticInst::setIWNextPC(), and gem5::ArmISA::ArmStaticInst::setNextPC().
|
pure virtual |
Implemented in gem5::CheckerCPU, gem5::minor::ExecContext, gem5::o3::DynInst, and gem5::SimpleExecContext.
|
inlinevirtual |
Perform an atomic memory read operation.
Must be overridden for exec contexts that support atomic memory mode. Not pure virtual since exec contexts that only support timing memory mode need not override (though in that case this function should never be called).
Reimplemented in gem5::SimpleExecContext.
Definition at line 124 of file exec_context.hh.
References panic.
Referenced by gem5::X86ISA::readMemAtomic(), and gem5::X86ISA::readPackedMemAtomic().
|
pure virtual |
Implemented in gem5::CheckerCPU, gem5::minor::ExecContext, gem5::o3::DynInst, and gem5::SimpleExecContext.
|
pure virtual |
Reads a miscellaneous register, handling any architectural side effects due to reading that register.
Implemented in gem5::CheckerCPU, gem5::minor::ExecContext, gem5::o3::DynInst, and gem5::SimpleExecContext.
Referenced by gem5::RiscvISA::VlFFTrimVlMicroOp::execute(), gem5::RiscvISA::VxsatMicroInst::execute(), and gem5::ArmISA::ISA::handleLockedSnoopHit().
|
pure virtual |
Implemented in gem5::CheckerCPU, gem5::minor::ExecContext, gem5::o3::DynInst, and gem5::SimpleExecContext.
|
pure virtual |
Implemented in gem5::CheckerCPU, gem5::minor::ExecContext, gem5::o3::DynInst, and gem5::SimpleExecContext.
|
pure virtual |
Returns the number of consecutive store conditional failures.
Implemented in gem5::CheckerCPU, gem5::minor::ExecContext, gem5::o3::DynInst, and gem5::SimpleExecContext.
|
pure virtual |
Implemented in gem5::CheckerCPU, gem5::minor::ExecContext, gem5::o3::DynInst, and gem5::SimpleExecContext.
|
pure virtual |
Sets a miscellaneous register, handling any architectural side effects due to writing that register.
Implemented in gem5::CheckerCPU, gem5::minor::ExecContext, gem5::o3::DynInst, and gem5::SimpleExecContext.
Referenced by gem5::RiscvISA::VxsatMicroInst::execute(), gem5::ArmISA::ISA::globalClearExclusive(), gem5::ArmISA::ISA::handleLockedRead(), and gem5::ArmISA::ISA::handleLockedSnoopHit().
|
pure virtual |
Implemented in gem5::CheckerCPU, gem5::minor::ExecContext, gem5::o3::DynInst, and gem5::SimpleExecContext.
|
pure virtual |
Implemented in gem5::CheckerCPU, gem5::minor::ExecContext, gem5::o3::DynInst, and gem5::SimpleExecContext.
|
pure virtual |
Implemented in gem5::CheckerCPU, gem5::minor::ExecContext, gem5::o3::DynInst, and gem5::SimpleExecContext.
|
pure virtual |
Implemented in gem5::CheckerCPU, gem5::minor::ExecContext, gem5::o3::DynInst, and gem5::SimpleExecContext.
|
pure virtual |
Sets the number of consecutive store conditional failures.
Implemented in gem5::CheckerCPU, gem5::minor::ExecContext, gem5::o3::DynInst, and gem5::SimpleExecContext.
|
pure virtual |
Returns a pointer to the ThreadContext.
Implemented in gem5::CheckerCPU, gem5::minor::ExecContext, gem5::o3::DynInst, and gem5::SimpleExecContext.
Referenced by gem5::DebugStep::execute(), gem5::McrMrcImplDefined::execute(), gem5::McrMrcMiscInst::execute(), gem5::MiscRegImplDefined64::execute(), gem5::RiscvISA::VlFFTrimVlMicroOp::execute(), gem5::RiscvISA::VMaskMergeMicroInst::execute(), gem5::X86ISA::MicroHalt::execute(), gem5::RiscvISA::SystemOp::executeEBreakOrSemihosting(), gem5::ArmISA::ISA::globalClearExclusive(), gem5::ArmISA::ISA::handleLockedRead(), gem5::ArmISA::ISA::handleLockedSnoop(), gem5::ArmISA::ISA::handleLockedSnoopHit(), gem5::ArmISA::ISA::handleLockedWrite(), gem5::RiscvSemihosting::isSemihostingEBreak(), gem5::TlbiOp64::performTlbi(), gem5::TlbiOp::performTlbi(), gem5::MipsISA::readRegOtherThread(), gem5::MipsISA::setRegOtherThread(), and gem5::ArmISA::ArmStaticInst::softwareBreakpoint32().
|
pure virtual |
For atomic-mode contexts, perform an atomic memory write operation.
For timing-mode contexts, initiate a timing memory write operation.
Implemented in gem5::minor::ExecContext, and gem5::SimpleExecContext.
Referenced by gem5::X86ISA::writeMemAtomic(), gem5::X86ISA::writeMemTiming(), and gem5::X86ISA::writePackedMem().