53 #ifndef __CPU_MINOR_EXEC_CONTEXT_HH__
54 #define __CPU_MINOR_EXEC_CONTEXT_HH__
62 #include "debug/MinorExecute.hh"
97 DPRINTF(MinorExecute,
"ExecContext setting PC: %s\n",
inst->pc);
101 #if THE_ISA == ALPHA_ISA
111 size, addr, flags, NULL);
120 size, addr, flags, res);
226 #if THE_ISA == ALPHA_ISA
236 #if THE_ISA == ALPHA_ISA
247 panic(
"Syscall emulation isn't available in FS mode.\n");
335 return other_thread->
setIntReg(idx, val);
357 {
return getCpuPtr()->getCpuAddrMonitor(
inst->id.threadId); }
uint64_t readIntReg(int reg_idx)
void setMiscReg(int misc_reg, const MiscReg &val, ThreadID tid=0)
decltype(nullptr) constexpr NoFault
Fault initiateMemRead(Addr addr, unsigned int size, Request::Flags flags) override
Initiate a timing memory read operation.
bool simPalCheck(int palFunc) override
Check for special simulator handling of specific PAL calls.
TheISA::FloatRegBits readFloatRegOperandBits(const StaticInst *si, int idx) override
Reads a floating point register in its binary format, instead of by value.
Declaration of a request, the overall memory request consisting of the parts of the request that are ...
All the fun of executing instructions from Decode and sending branch/new instruction stream info...
RegIndex destRegIdx(int i) const
Return logical index (architectural reg num) of i'th destination reg.
LSQ & getLSQ()
To allow ExecContext to find the LSQ.
void syscall(int64_t callnum, Fault *fault) override
Executes a syscall specified by the callnum.
TheISA::CCReg readCCRegOperand(const StaticInst *si, int idx) override
MinorDynInstPtr inst
Instruction for the benefit of memory operations and for PC.
bool simPalCheck(int palFunc)
Check for special simulator handling of specific PAL calls.
bool FullSystem
The FullSystem variable can be used to determine the current mode of simulation.
Execute & execute
The execute stage so we can peek at its contents.
The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interf...
ThreadContext * tcBase() override
Returns a pointer to the ThreadContext.
void setEA(Addr ea) override
Record the effective address of the instruction.
ThreadContext is the external interface to all thread state for anything outside of the CPU...
ExecContext bears the exec_context interface for Minor.
unsigned int readStCondFailures() const override
Returns the number of consecutive store conditional failures.
uint64_t readRegOtherThread(int idx, ThreadID tid=InvalidThreadID)
void setCCReg(int reg_idx, CCReg val)
void syscall(int64_t callnum, Fault *fault)
TheISA::MiscReg readMiscRegOperand(const StaticInst *si, int idx) override
Addr getEA() const override
Get the effective address of the instruction.
TheISA::PCState pcState() const override
MiscReg readMiscRegNoEffect(int misc_reg, ThreadID tid=0) const
IntReg readIntRegOperand(const StaticInst *si, int idx) override
Reads an integer register.
void pushRequest(MinorDynInstPtr inst, bool isLoad, uint8_t *data, unsigned int size, Addr addr, Request::Flags flags, uint64_t *res)
Single interface for readMem/writeMem to issue requests into the LSQ.
void demapInstPage(Addr vaddr, uint64_t asn)
MiscReg readMiscReg(int misc_reg, ThreadID tid=0)
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.
void setStCondFailures(unsigned int st_cond_failures) override
Sets the number of consecutive store conditional failures.
void pcState(const TheISA::PCState &val) override
TheISA::MiscReg readMiscReg(int misc_reg) override
Reads a miscellaneous register, handling any architectural side effects due to reading that register...
void demapDataPage(Addr vaddr, uint64_t asn)
AddressMonitor * getAddrMonitor() override
void setFloatRegOperand(const StaticInst *si, int idx, TheISA::FloatReg val) override
Sets a floating point register of single width to a value.
void setFloatRegBits(int reg_idx, FloatRegBits val)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
ThreadContext * getTC()
Returns the pointer to this SimpleThread's ThreadContext.
TheISA::TLB * getDTBPtr()
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
void setFloatReg(int reg_idx, FloatReg val)
void setMiscRegOperand(const StaticInst *si, int idx, const TheISA::MiscReg &val) override
RegIndex srcRegIdx(int i) const
Return logical index (architectural reg num) of i'th source reg.
const ThreadID InvalidThreadID
TheISA::FloatReg readFloatRegOperand(const StaticInst *si, int idx) override
Reads a floating point register of single register width.
TheISA::PCState pcState()
CCReg readCCReg(int reg_idx)
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.
int16_t ThreadID
Thread index/ID type.
FloatReg readFloatReg(int reg_idx)
void setIntReg(int reg_idx, uint64_t val)
SimpleThread & thread
ThreadState object, provides all the architectural state.
FloatRegBits readFloatRegBits(int reg_idx)
bool readPredicate() override
GenericISA::SimplePCState< MachInst > PCState
TheISA::TLB * getITBPtr()
void armMonitor(Addr address) override
std::vector< Minor::MinorThread * > threads
These are thread state-representing objects for this CPU.
Base, ISA-independent static instruction class.
void setPredicate(bool val) override
The constructed pipeline.
ExecContext(MinorCPU &cpu_, SimpleThread &thread_, Execute &execute_, MinorDynInstPtr inst_)
void setRegOtherThread(int idx, const TheISA::MiscReg &val, ThreadID tid=InvalidThreadID)
void setIntRegOperand(const StaticInst *si, int idx, IntReg val) override
Sets an integer register to a value.
void mwaitAtomic(ThreadContext *tc) override
void demapPage(Addr vaddr, uint64_t asn) override
Invalidate a page in the DTLB and ITLB.
ContextID contextId() const
MinorCPU is an in-order CPU model with four fixed pipeline stages:
std::shared_ptr< FaultBase > Fault
int ContextID
Globally unique thread context ID.
void setMiscReg(int misc_reg, const TheISA::MiscReg &val) override
Sets a miscellaneous register, handling any architectural side effects due to writing that register...
TheISA::MiscReg readMiscRegNoEffect(int misc_reg) const
void setCCRegOperand(const StaticInst *si, int idx, TheISA::CCReg val) override
Fault hwrei() override
Somewhat Alpha-specific function that handles returning from an error or interrupt.
void setPredicate(bool val)
bool mwait(PacketPtr pkt) override