Go to the documentation of this file.
41 #ifndef __CPU_SIMPLE_EXEC_CONTEXT_HH__
42 #define __CPU_SIMPLE_EXEC_CONTEXT_HH__
44 #include "arch/registers.hh"
46 #include "config/the_isa.hh"
178 assert(
reg.isIntReg());
188 assert(
reg.isIntReg());
199 assert(
reg.isFloatReg());
210 assert(
reg.isFloatReg());
220 assert(
reg.isVecReg());
230 assert(
reg.isVecReg());
241 assert(
reg.isVecReg());
248 template <
typename VecElem>
254 assert(
reg.isVecReg());
261 {
return readVecLaneOperand<uint8_t>(
si, idx); }
267 {
return readVecLaneOperand<uint16_t>(
si, idx); }
273 {
return readVecLaneOperand<uint32_t>(
si, idx); }
279 {
return readVecLaneOperand<uint64_t>(
si, idx); }
282 template <
typename LD>
289 assert(
reg.isVecReg());
320 assert(
reg.isVecElem());
331 assert(
reg.isVecElem());
340 assert(
reg.isVecPredReg());
349 assert(
reg.isVecPredReg());
359 assert(
reg.isVecPredReg());
368 assert(
reg.isCCReg());
377 assert(
reg.isCCReg());
386 assert(
reg.isMiscReg());
395 assert(
reg.isMiscReg());
439 assert(byte_enable.empty() || byte_enable.size() == size);
449 assert(byte_enable.empty() || byte_enable.size() == size);
459 assert(byte_enable.empty() || byte_enable.size() == size);
594 #endif // __CPU_EXEC_CONTEXT_HH__
RegVal readIntRegOperand(const StaticInst *si, int idx) override
Reads an integer register.
void setMiscReg(int misc_reg, RegVal val) override
Sets a miscellaneous register, handling any architectural side effects due to writing that register.
Stats::Scalar numVecInsts
bool mwait(ThreadID tid, PacketPtr pkt)
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
void armMonitor(Addr address) override
TheISA::PCState pcState() const override
Trace::InstRecord * traceData
Stats::Scalar numCCRegReads
Stats::Scalar numFpRegWrites
void setMemAccPredicate(bool val)
bool readPredicate() const override
Generic predicate register container.
void setVecReg(const RegId ®, const VecRegContainer &val) override
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::FourByte > &val) override
Write a lane of the destination vector operand.
virtual ConstVecLane64 readVec64BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 64bit operand.
VecReg::Container VecRegContainer
const VecRegContainer & readVecReg(const RegId ®) const override
Fault initiateHtmCmd(Request::Flags flags) override
Initiate an HTM command, e.g.
Stats::Formula numIdleCycles
unsigned int readStCondFailures() const override
Returns the number of consecutive store conditional failures.
void setStCondFailures(unsigned int sc_failures) override
Sets the number of consecutive store conditional failures.
Base, ISA-independent static instruction class.
VecRegContainer & getWritableVecReg(const RegId ®) override
Stats::Scalar numLoadInsts
virtual ConstVecLane16 readVec16BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 16bit operand.
void setPredicate(bool val)
void armMonitor(ThreadID tid, Addr address)
virtual Fault initiateHtmCmd(Request::Flags flags)=0
Hardware transactional memory commands (HtmCmds), e.g.
void setIntReg(RegIndex reg_idx, RegVal val) override
void setCCReg(RegIndex reg_idx, RegVal val) override
void mwaitAtomic(ThreadID tid, ThreadContext *tc, BaseTLB *dtb)
void setVecElemOperand(const StaticInst *si, int idx, const VecElem val) override
Sets an element of a vector register to a value.
VecPredRegContainer & getWritableVecPredRegOperand(const StaticInst *si, int idx) override
Gets destination predicate register operand for modification.
void setVecLaneOperandT(const StaticInst *si, int idx, const LD &val)
Write a lane of the destination vector operand.
PCState pcState() const override
Stats::Scalar numIntAluAccesses
RegVal readCCReg(RegIndex reg_idx) const override
VecElem readVecElemOperand(const StaticInst *si, int idx) const override
Reads an element of a vector register.
A vector of scalar stats.
void setMemAccPredicate(bool val) override
unsigned readStCondFailures() const override
Register ID: describe an architectural register with its class and index.
void setPredicate(bool val) override
The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interf...
void setMiscReg(RegIndex misc_reg, RegVal val) override
Stats::Scalar numVecPredRegWrites
Stats::Scalar numIntRegReads
void mwaitAtomic(ThreadContext *tc) override
This is a simple scalar statistic, like a counter.
void demapPage(Addr vaddr, uint64_t asn)
Fault amoMem(Addr addr, uint8_t *data, unsigned int size, Request::Flags flags, AtomicOpFunctorPtr amo_op) override
For atomic-mode contexts, perform an atomic AMO (a.k.a., Atomic Read-Modify-Write Memory Operation)
Stats::Scalar numIntRegWrites
const VecPredRegContainer & readVecPredRegOperand(const StaticInst *si, int idx) const override
Predicate registers interface.
int64_t Counter
Statistics counter type.
void setVecPredRegOperand(const StaticInst *si, int idx, const VecPredRegContainer &val) override
Sets a destination predicate register operand to a value.
Stats::Scalar numPredictedBranches
Number of branches predicted as taken.
Fault writeMem(uint8_t *data, unsigned int size, Addr addr, Request::Flags flags, uint64_t *res, const std::vector< bool > &byte_enable=std::vector< bool >()) override
For atomic-mode contexts, perform an atomic memory write operation.
VecRegContainer & getWritableVecRegOperand(const StaticInst *si, int idx) override
Reads a vector register for modification.
int64_t htmTransactionStops
ThreadContext is the external interface to all thread state for anything outside of the CPU.
AddressMonitor * getAddrMonitor() override
ThreadContext * getTC()
Returns the pointer to this SimpleThread's ThreadContext.
VecLaneT< VecElem, true > readVecLaneOperand(const StaticInst *si, int idx) const
Vector Register Lane Interfaces.
Vector Lane abstraction Another view of a container.
Stats::Scalar dcacheStallCycles
VecPredRegContainer & getWritableVecPredReg(const RegId ®) override
virtual Fault readMem(Addr addr, uint8_t *data, unsigned size, Request::Flags flags, const std::vector< bool > &byte_enable=std::vector< bool >())
void setStCondFailures(unsigned sc_failures) override
std::shared_ptr< FaultBase > Fault
virtual ConstVecLane32 readVec32BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 32bit operand.
RegVal readMiscReg(RegIndex misc_reg) override
bool readMemAccPredicate() const override
void demapPage(Addr vaddr, uint64_t asn) override
Invalidate a page in the DTLB and ITLB.
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
virtual Fault amoMem(Addr addr, uint8_t *data, unsigned size, Request::Flags flags, AtomicOpFunctorPtr amo_op)
Stats::Scalar icacheStallCycles
virtual ConstVecLane8 readVec8BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 8bit operand.
void setVecRegOperand(const StaticInst *si, int idx, const VecRegContainer &val) override
Sets a vector register to a value.
virtual Fault initiateMemAMO(Addr addr, unsigned size, Request::Flags flags, AtomicOpFunctorPtr amo_op)
Stats::Scalar numFpRegReads
virtual Fault initiateMemRead(Addr addr, unsigned size, Request::Flags flags, const std::vector< bool > &byte_enable=std::vector< bool >())
VecLaneT< T, true > readVecLane(const RegId ®) const
Vector Register Lane Interfaces.
Stats::Scalar numVecRegWrites
void setVecElem(const RegId ®, const VecElem &val) override
AddressMonitor * getCpuAddrMonitor(ThreadID tid)
void pcState(const PCState &val) override
RegVal readMiscRegOperand(const StaticInst *si, int idx) override
bool readMemAccPredicate()
Fault initiateMemAMO(Addr addr, unsigned int size, Request::Flags flags, AtomicOpFunctorPtr amo_op) override
For timing-mode contexts, initiate an atomic AMO (atomic read-modify-write memory operation)
RegVal readIntReg(RegIndex reg_idx) const override
void setVecPredReg(const RegId ®, const VecPredRegContainer &val) override
uint64_t getHtmTransactionalDepth() const override
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
RegVal readFloatReg(RegIndex reg_idx) const override
const VecRegContainer & readVecRegOperand(const StaticInst *si, int idx) const override
Reads a vector register.
Stats::Scalar numIntInsts
Stats::Scalar numVecRegReads
void setFloatReg(RegIndex reg_idx, RegVal val) override
bool mwait(PacketPtr pkt) override
const VecPredRegContainer & readVecPredReg(const RegId ®) const override
Stats::Scalar numCallsReturns
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::TwoByte > &val) override
Write a lane of the destination vector operand.
Stats::Scalar numBranches
Stats::Formula idleFraction
A stat that calculates the per tick average of a value.
Fault initiateMemRead(Addr addr, unsigned int size, Request::Flags flags, const std::vector< bool > &byte_enable=std::vector< bool >()) override
Initiate a timing memory read operation.
RegVal readMiscReg(int misc_reg) override
Reads a miscellaneous register, handling any architectural side effects due to reading that register.
Counter numInst
PER-THREAD STATS.
uint64_t newHtmTransactionUid() const override
int64_t htmTransactionStarts
GenericISA::DelaySlotPCState< MachInst > PCState
void setIntRegOperand(const StaticInst *si, int idx, RegVal val) override
Sets an integer register to a value.
Stats::Formula numBusyCycles
virtual Fault writeMem(uint8_t *data, unsigned size, Addr addr, Request::Flags flags, uint64_t *res, const std::vector< bool > &byte_enable=std::vector< bool >())
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Stats::Scalar numStoreInsts
void setCCRegOperand(const StaticInst *si, int idx, RegVal val) override
int threadId() const override
RegVal readFloatRegOperandBits(const StaticInst *si, int idx) override
Reads a floating point register in its binary format, instead of by value.
void setPredicate(bool val)
Stats::Scalar numCondCtrlInsts
void setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
virtual void setVecLane(const RegId ®, const LaneData< LaneSize::Byte > &val) override
Write a lane of the destination vector register.
Stats::Scalar numVecAluAccesses
Stats::Scalar numFpAluAccesses
virtual BaseHTMCheckpointPtr & getHtmCheckpointPtr()=0
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::EightByte > &val) override
Write a lane of the destination vector operand.
Stats::Scalar numBranchMispred
Number of misprediced branches.
bool inHtmTransactionalState() const override
uint64_t getHtmTransactionUid() const override
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::Byte > &val) override
Write a lane of the destination vector operand.
const VecElem & readVecElem(const RegId ®) const override
void syscall() override
Executes a syscall specified by the callnum.
Stats::Average notIdleFraction
Fault readMem(Addr addr, uint8_t *data, unsigned int size, Request::Flags flags, const std::vector< bool > &byte_enable=std::vector< bool >()) override
Perform an atomic memory read operation.
LaneSize is an abstraction of a LS byte value for the execution and thread contexts to handle values ...
Stats::Scalar numVecPredRegReads
RegVal readCCRegOperand(const StaticInst *si, int idx) override
void setFloatRegOperandBits(const StaticInst *si, int idx, RegVal val) override
Sets the bits of a floating point register of single width to a binary value.
bool readPredicate() const
Vector Register Abstraction This generic class is the model in a particularization of MVC,...
ThreadContext * tcBase() const override
Returns a pointer to the ThreadContext.
Stats::Vector statExecutedInstType
Stats::Scalar numCCRegWrites
SimpleExecContext(BaseSimpleCPU *_cpu, SimpleThread *_thread)
Constructor.
Generated on Wed Sep 30 2020 14:02:08 for gem5 by doxygen 1.8.17