gem5
|
ExecContext bears the exec_context interface for Minor. More...
#include <exec_context.hh>
Public Member Functions | |
ExecContext (MinorCPU &cpu_, SimpleThread &thread_, Execute &execute_, MinorDynInstPtr inst_) | |
Fault | initiateMemRead (Addr addr, unsigned int size, Request::Flags flags) override |
Initiate a timing memory read operation. More... | |
Fault | writeMem (uint8_t *data, unsigned int size, Addr addr, Request::Flags flags, uint64_t *res) override |
For atomic-mode contexts, perform an atomic memory write operation. More... | |
IntReg | readIntRegOperand (const StaticInst *si, int idx) override |
Reads an integer register. More... | |
TheISA::FloatReg | readFloatRegOperand (const StaticInst *si, int idx) override |
Reads a floating point register of single register width. More... | |
TheISA::FloatRegBits | readFloatRegOperandBits (const StaticInst *si, int idx) override |
Reads a floating point register in its binary format, instead of by value. More... | |
void | setIntRegOperand (const StaticInst *si, int idx, IntReg val) override |
Sets an integer register to a value. More... | |
void | setFloatRegOperand (const StaticInst *si, int idx, TheISA::FloatReg val) override |
Sets a floating point register of single width to a value. More... | |
void | setFloatRegOperandBits (const StaticInst *si, int idx, TheISA::FloatRegBits val) override |
Sets the bits of a floating point register of single width to a binary value. More... | |
bool | readPredicate () override |
void | setPredicate (bool val) override |
TheISA::PCState | pcState () const override |
void | pcState (const TheISA::PCState &val) override |
TheISA::MiscReg | readMiscRegNoEffect (int misc_reg) const |
TheISA::MiscReg | readMiscReg (int misc_reg) override |
Reads a miscellaneous register, handling any architectural side effects due to reading that register. More... | |
void | setMiscReg (int misc_reg, const TheISA::MiscReg &val) override |
Sets a miscellaneous register, handling any architectural side effects due to writing that register. More... | |
TheISA::MiscReg | readMiscRegOperand (const StaticInst *si, int idx) override |
void | setMiscRegOperand (const StaticInst *si, int idx, const TheISA::MiscReg &val) override |
Fault | hwrei () override |
Somewhat Alpha-specific function that handles returning from an error or interrupt. More... | |
bool | simPalCheck (int palFunc) override |
Check for special simulator handling of specific PAL calls. More... | |
void | syscall (int64_t callnum, Fault *fault) override |
Executes a syscall specified by the callnum. More... | |
ThreadContext * | tcBase () override |
Returns a pointer to the ThreadContext. More... | |
unsigned int | readStCondFailures () const override |
Returns the number of consecutive store conditional failures. More... | |
void | setStCondFailures (unsigned int st_cond_failures) override |
Sets the number of consecutive store conditional failures. More... | |
ContextID | contextId () |
void | demapPage (Addr vaddr, uint64_t asn) override |
Invalidate a page in the DTLB and ITLB. More... | |
TheISA::CCReg | readCCRegOperand (const StaticInst *si, int idx) override |
void | setCCRegOperand (const StaticInst *si, int idx, TheISA::CCReg val) override |
void | demapInstPage (Addr vaddr, uint64_t asn) |
void | demapDataPage (Addr vaddr, uint64_t asn) |
void | setEA (Addr ea) override |
Record the effective address of the instruction. More... | |
BaseCPU * | getCpuPtr () |
Addr | getEA () const override |
Get the effective address of the instruction. More... | |
uint64_t | readRegOtherThread (int idx, ThreadID tid=InvalidThreadID) |
void | setRegOtherThread (int idx, const TheISA::MiscReg &val, ThreadID tid=InvalidThreadID) |
void | armMonitor (Addr address) override |
bool | mwait (PacketPtr pkt) override |
void | mwaitAtomic (ThreadContext *tc) override |
AddressMonitor * | getAddrMonitor () override |
Public Member Functions inherited from ExecContext | |
virtual Fault | readMem (Addr addr, uint8_t *data, unsigned int size, Request::Flags flags) |
Perform an atomic memory read operation. More... | |
virtual void | setRegOtherThread (int regIdx, MiscReg val, ThreadID tid=InvalidThreadID)=0 |
Public Attributes | |
MinorCPU & | cpu |
SimpleThread & | thread |
ThreadState object, provides all the architectural state. More... | |
Execute & | execute |
The execute stage so we can peek at its contents. More... | |
MinorDynInstPtr | inst |
Instruction for the benefit of memory operations and for PC. More... | |
Additional Inherited Members | |
Public Types inherited from ExecContext | |
typedef TheISA::IntReg | IntReg |
typedef TheISA::PCState | PCState |
typedef TheISA::FloatReg | FloatReg |
typedef TheISA::FloatRegBits | FloatRegBits |
typedef TheISA::MiscReg | MiscReg |
typedef TheISA::CCReg | CCReg |
ExecContext bears the exec_context interface for Minor.
This nicely separates that interface from other classes such as Pipeline, MinorCPU and DynMinorInst and makes it easier to see what state is accessed by it.
Definition at line 74 of file exec_context.hh.
|
inline |
Definition at line 88 of file exec_context.hh.
References DPRINTF, inst, pcState(), SimpleThread::setFloatReg(), SimpleThread::setIntReg(), setPredicate(), thread, and AlphaISA::ZeroReg.
|
inlineoverridevirtual |
Implements ExecContext.
Definition at line 347 of file exec_context.hh.
References getCpuPtr(), and inst.
|
inline |
Definition at line 258 of file exec_context.hh.
References ThreadState::contextId(), and thread.
|
inline |
Definition at line 290 of file exec_context.hh.
References SimpleThread::getDTBPtr(), and thread.
|
inline |
Definition at line 284 of file exec_context.hh.
References SimpleThread::getITBPtr(), and thread.
|
inlineoverridevirtual |
Invalidate a page in the DTLB and ITLB.
Implements ExecContext.
Definition at line 263 of file exec_context.hh.
References SimpleThread::getDTBPtr(), SimpleThread::getITBPtr(), and thread.
|
inlineoverridevirtual |
Implements ExecContext.
Definition at line 356 of file exec_context.hh.
References getCpuPtr(), and inst.
|
inline |
Definition at line 301 of file exec_context.hh.
References cpu.
Referenced by armMonitor(), getAddrMonitor(), mwait(), and mwaitAtomic().
|
inlineoverridevirtual |
Get the effective address of the instruction.
Implements ExecContext.
Definition at line 304 of file exec_context.hh.
References inst.
|
inlineoverridevirtual |
Somewhat Alpha-specific function that handles returning from an error or interrupt.
Implements ExecContext.
Definition at line 224 of file exec_context.hh.
References SimpleThread::hwrei(), NoFault, and thread.
|
inlineoverridevirtual |
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 from ExecContext.
Definition at line 107 of file exec_context.hh.
References execute, Minor::Execute::getLSQ(), inst, NoFault, and Minor::LSQ::pushRequest().
|
inlineoverridevirtual |
Implements ExecContext.
Definition at line 350 of file exec_context.hh.
References getCpuPtr(), and inst.
|
inlineoverridevirtual |
Implements ExecContext.
Definition at line 353 of file exec_context.hh.
References SimpleThread::dtb, getCpuPtr(), inst, and thread.
|
inlineoverridevirtual |
Implements ExecContext.
Definition at line 179 of file exec_context.hh.
References SimpleThread::pcState(), and thread.
Referenced by ExecContext().
|
inlineoverridevirtual |
Implements ExecContext.
Definition at line 185 of file exec_context.hh.
References SimpleThread::pcState(), and thread.
|
inlineoverridevirtual |
Implements ExecContext.
Definition at line 270 of file exec_context.hh.
References AlphaISA::CC_Reg_Base, SimpleThread::readCCReg(), StaticInst::srcRegIdx(), and thread.
|
inlineoverridevirtual |
Reads a floating point register of single register width.
Implements ExecContext.
Definition at line 131 of file exec_context.hh.
References AlphaISA::FP_Reg_Base, SimpleThread::readFloatReg(), StaticInst::srcRegIdx(), and thread.
|
inlineoverridevirtual |
Reads a floating point register in its binary format, instead of by value.
Implements ExecContext.
Definition at line 138 of file exec_context.hh.
References AlphaISA::FP_Reg_Base, SimpleThread::readFloatRegBits(), StaticInst::srcRegIdx(), and thread.
|
inlineoverridevirtual |
Reads an integer register.
Implements ExecContext.
Definition at line 125 of file exec_context.hh.
References SimpleThread::readIntReg(), StaticInst::srcRegIdx(), and thread.
|
inlineoverridevirtual |
Reads a miscellaneous register, handling any architectural side effects due to reading that register.
Implements ExecContext.
Definition at line 197 of file exec_context.hh.
References SimpleThread::readMiscReg(), and thread.
|
inline |
Definition at line 191 of file exec_context.hh.
References SimpleThread::readMiscRegNoEffect(), and thread.
|
inlineoverridevirtual |
Implements ExecContext.
Definition at line 209 of file exec_context.hh.
References AlphaISA::Misc_Reg_Base, SimpleThread::readMiscReg(), StaticInst::srcRegIdx(), and thread.
|
inlineoverridevirtual |
Implements ExecContext.
Definition at line 167 of file exec_context.hh.
References SimpleThread::readPredicate(), and thread.
Referenced by Minor::Execute::commitInst(), Minor::Execute::executeMemRefInst(), and Minor::Execute::handleMemResponse().
|
inlinevirtual |
Implements ExecContext.
Definition at line 311 of file exec_context.hh.
References cpu, AlphaISA::FP_Reg_Base, InvalidThreadID, AlphaISA::Misc_Reg_Base, SimpleThread::readFloatRegBits(), SimpleThread::readIntReg(), SimpleThread::readMiscReg(), thread, and MinorCPU::threads.
|
inlineoverridevirtual |
Returns the number of consecutive store conditional failures.
Implements ExecContext.
Definition at line 255 of file exec_context.hh.
|
inlineoverridevirtual |
Implements ExecContext.
Definition at line 277 of file exec_context.hh.
References AlphaISA::CC_Reg_Base, StaticInst::destRegIdx(), SimpleThread::setCCReg(), and thread.
|
inlineoverridevirtual |
Record the effective address of the instruction.
Implements ExecContext.
Definition at line 296 of file exec_context.hh.
References ArmISA::ea, and inst.
|
inlineoverridevirtual |
Sets a floating point register of single width to a value.
Implements ExecContext.
Definition at line 151 of file exec_context.hh.
References StaticInst::destRegIdx(), AlphaISA::FP_Reg_Base, SimpleThread::setFloatReg(), and thread.
|
inlineoverridevirtual |
Sets the bits of a floating point register of single width to a binary value.
Implements ExecContext.
Definition at line 159 of file exec_context.hh.
References StaticInst::destRegIdx(), AlphaISA::FP_Reg_Base, SimpleThread::setFloatRegBits(), and thread.
|
inlineoverridevirtual |
Sets an integer register to a value.
Implements ExecContext.
Definition at line 145 of file exec_context.hh.
References StaticInst::destRegIdx(), SimpleThread::setIntReg(), thread, and X86ISA::val.
|
inlineoverridevirtual |
Sets a miscellaneous register, handling any architectural side effects due to writing that register.
Implements ExecContext.
Definition at line 203 of file exec_context.hh.
References SimpleThread::setMiscReg(), and thread.
|
inlineoverridevirtual |
Implements ExecContext.
Definition at line 216 of file exec_context.hh.
References StaticInst::destRegIdx(), AlphaISA::Misc_Reg_Base, SimpleThread::setMiscReg(), and thread.
|
inlineoverridevirtual |
Implements ExecContext.
Definition at line 173 of file exec_context.hh.
References SimpleThread::setPredicate(), and thread.
Referenced by ExecContext().
|
inline |
Definition at line 328 of file exec_context.hh.
References cpu, AlphaISA::FP_Reg_Base, InvalidThreadID, AlphaISA::Misc_Reg_Base, SimpleThread::setFloatRegBits(), SimpleThread::setIntReg(), SimpleThread::setMiscReg(), thread, and MinorCPU::threads.
|
inlineoverridevirtual |
Sets the number of consecutive store conditional failures.
Implements ExecContext.
Definition at line 256 of file exec_context.hh.
|
inlineoverridevirtual |
Check for special simulator handling of specific PAL calls.
If return value is false, actual PAL call will be suppressed.
Implements ExecContext.
Definition at line 234 of file exec_context.hh.
References SimpleThread::simPalCheck(), and thread.
|
inlineoverridevirtual |
Executes a syscall specified by the callnum.
Implements ExecContext.
Definition at line 244 of file exec_context.hh.
References FullSystem, panic, SimpleThread::syscall(), and thread.
|
inlineoverridevirtual |
Returns a pointer to the ThreadContext.
Implements ExecContext.
Definition at line 252 of file exec_context.hh.
References SimpleThread::getTC(), and thread.
|
inlineoverridevirtual |
For atomic-mode contexts, perform an atomic memory write operation.
For timing-mode contexts, initiate a timing memory write operation.
Implements ExecContext.
Definition at line 116 of file exec_context.hh.
References execute, Minor::Execute::getLSQ(), inst, NoFault, and Minor::LSQ::pushRequest().
MinorCPU& Minor::ExecContext::cpu |
Definition at line 77 of file exec_context.hh.
Referenced by getCpuPtr(), readRegOtherThread(), and setRegOtherThread().
Execute& Minor::ExecContext::execute |
The execute stage so we can peek at its contents.
Definition at line 83 of file exec_context.hh.
Referenced by initiateMemRead(), and writeMem().
MinorDynInstPtr Minor::ExecContext::inst |
Instruction for the benefit of memory operations and for PC.
Definition at line 86 of file exec_context.hh.
Referenced by armMonitor(), ExecContext(), getAddrMonitor(), getEA(), initiateMemRead(), mwait(), mwaitAtomic(), setEA(), and writeMem().
SimpleThread& Minor::ExecContext::thread |
ThreadState object, provides all the architectural state.
Definition at line 80 of file exec_context.hh.
Referenced by contextId(), demapDataPage(), demapInstPage(), demapPage(), ExecContext(), hwrei(), mwaitAtomic(), pcState(), readCCRegOperand(), readFloatRegOperand(), readFloatRegOperandBits(), readIntRegOperand(), readMiscReg(), readMiscRegNoEffect(), readMiscRegOperand(), readPredicate(), readRegOtherThread(), setCCRegOperand(), setFloatRegOperand(), setFloatRegOperandBits(), setIntRegOperand(), setMiscReg(), setMiscRegOperand(), setPredicate(), setRegOtherThread(), simPalCheck(), syscall(), and tcBase().