Go to the documentation of this file.
42 #ifndef __CPU_O3_DYN_INST_HH__
43 #define __CPU_O3_DYN_INST_HH__
47 #include "config/the_isa.hh"
61 typedef typename Impl::O3CPU
O3CPU;
110 int32_t dispatchTick;
112 int32_t completeTick;
154 assert(
reg.isMiscReg());
155 return this->
cpu->readMiscReg(reg.
index(), this->threadNumber);
165 assert(
reg.isMiscReg());
177 bool no_squash_from_TC = this->
thread->noSquashFromTC;
178 this->
thread->noSquashFromTC =
true;
180 for (
int i = 0;
i < _destMiscRegIdx.size();
i++)
181 this->
cpu->setMiscReg(
184 this->
thread->noSquashFromTC = no_squash_from_TC;
190 for (
int idx = 0; idx < this->
numDestRegs(); idx++) {
192 const RegId& original_dest_reg =
197 this->cpu->readIntReg(prev_phys_reg));
201 this->cpu->readFloatReg(prev_phys_reg));
205 this->cpu->readVecReg(prev_phys_reg));
209 this->cpu->readVecElem(prev_phys_reg));
213 this->cpu->readVecPredReg(prev_phys_reg));
217 this->cpu->readCCReg(prev_phys_reg));
223 panic(
"Unknown register class: %d",
277 return cpu->template readVecLane<uint8_t>(
285 return cpu->template readVecLane<uint16_t>(
293 return cpu->template readVecLane<uint32_t>(
301 return cpu->template readVecLane<uint64_t>(
306 template <
typename LD>
353 return this->
cpu->getWritableVecPredReg(
412 #endif // __CPU_O3_ALPHA_DYN_INST_HH__
void setCCRegOperand(const StaticInst *si, int idx, RegVal val) override
Records a CC register being set to a value.
TheISA::PCState predPC
Predicted PC state after this instruction.
void setMiscReg(int misc_reg, RegVal val) override
Sets a misc.
ConstVecLane16 readVec16BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 16bit operand.
Impl::O3CPU O3CPU
Typedef for the CPU.
void initVars()
Initializes variables.
const RegId & destRegIdx(int i) const
Return logical index (architectural reg num) of i'th destination reg.
VecReg::Container VecRegContainer
@ VecElemClass
Vector Register Native Elem lane.
ImplState * thread
Pointer to the thread state.
static constexpr auto NumVecElemPerVecReg
Register types.
Base, ISA-independent static instruction class.
Fault fault
The kind of fault this instruction has generated.
uint64_t Tick
Tick count type.
VecPredReg::Container VecPredRegContainer
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::EightByte > &val) override
void setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
Sets a misc.
BaseO3DynInst(const StaticInstPtr &staticInst, const StaticInstPtr ¯oop, TheISA::PCState pc, TheISA::PCState predPC, InstSeqNum seq_num, O3CPU *cpu)
BaseDynInst constructor given a binary instruction.
void setFloatRegOperandBits(const StaticInst *si, int idx, RegVal val) override
Records an fp register being set to an integer value.
ConstVecLane32 readVec32BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 32bit operand.
void updateMiscRegs()
Called at the commit stage to update the misc.
Register ID: describe an architectural register with its class and index.
RegVal readIntRegOperand(const StaticInst *si, int idx) override
Reads an integer register.
void setIntRegOperand(const StaticInst *si, int idx, RegVal val) override
RegVal readMiscRegOperand(const StaticInst *si, int idx) override
Reads a misc.
void setIntRegOperand(const StaticInst *si, int idx, RegVal val) override
Records an integer register being set to a value.
RegVal readMiscReg(int misc_reg) override
Reads a misc.
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::FourByte > &val) override
void setVecRegOperand(const StaticInst *si, int idx, const TheISA::VecRegContainer &val) override
Record a vector register being set to a value.
@ FloatRegClass
Floating-point register.
TheISA::PCState pc
PC state for this instruction.
Vector Lane abstraction Another view of a container.
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::TwoByte > &val) override
void setVecElemOperand(const StaticInst *si, int idx, const TheISA::VecElem val) override
Record a vector register being set to a value.
Fault execute()
Executes the instruction.
std::shared_ptr< FaultBase > Fault
void setCCRegOperand(const StaticInst *si, int idx, RegVal val) override
Records a CC register being set to a value.
constexpr unsigned NumVecElemPerVecReg
std::vector< RegVal > _destMiscRegVal
Values to be written to the destination misc.
TheISA::VecElem readVecElemOperand(const StaticInst *si, int idx) const override
Vector Elem Interfaces.
void setVecRegOperand(const StaticInst *si, int idx, const TheISA::VecRegContainer &val) override
Record a vector register being set to a value.
void setVecLaneOperandT(const StaticInst *si, int idx, const LD &val)
Write a lane of the destination vector operand.
ImplCPU * cpu
Pointer to the Impl's CPU object.
PhysRegIdPtr renamedSrcIdx(int idx) const
PhysRegIdPtr renamedDestIdx(int idx) const
void setFloatRegOperandBits(const StaticInst *si, int idx, RegVal val) override
Records an fp register being set to an integer value.
size_t numDestRegs() const
Returns the number of destination registers.
ConstVecLane8 readVec8BitLaneOperand(const StaticInst *si, int idx) const override
Vector Register Lane Interfaces.
const TheISA::VecRegContainer & readVecRegOperand(const StaticInst *si, int idx) const override
Vector Register Interfaces.
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::Byte > &val) override
Write a lane of the destination vector operand.
RegVal readFloatRegOperandBits(const StaticInst *si, int idx) override
Reads a floating point register in its binary format, instead of by value.
@ IntRegClass
Integer register.
TheISA::VecPredRegContainer & getWritableVecPredRegOperand(const StaticInst *si, int idx) override
Gets destination predicate register operand for modification.
@ CCRegClass
Condition-code register.
RegVal readCCRegOperand(const StaticInst *si, int idx) override
Fault initiateAcc()
Initiates the access.
PhysRegIdPtr prevDestIdx(int idx) const
@ MiscRegClass
Control (misc) register.
@ VecRegClass
Vector Register.
ConstVecLane64 readVec64BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 64bit operand.
const StaticInstPtr staticInst
The StaticInst used by this BaseDynInst.
void setVecPredRegOperand(const StaticInst *si, int idx, const TheISA::VecPredRegContainer &val) override
Record a vector register being set to a value.
Fault completeAcc(PacketPtr pkt)
Completes the access.
TheISA::VecRegContainer & getWritableVecRegOperand(const StaticInst *si, int idx) override
Read destination vector register operand for modification.
GenericISA::DelaySlotPCState< MachInst > PCState
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
ThreadID threadNumber
The thread this instruction is from.
const TheISA::VecPredRegContainer & readVecPredRegOperand(const StaticInst *si, int idx) const override
Predicate registers interface.
const RegIndex & index() const
Index accessors.
const StaticInstPtr macroop
The Macroop if one exists.
const RegClass & classValue() const
Class accessor.
void setVecPredRegOperand(const StaticInst *si, int idx, const TheISA::VecPredRegContainer &val) override
Record a vector register being set to a value.
void trap(const Fault &fault)
Traps to handle specified fault.
LaneSize is an abstraction of a LS byte value for the execution and thread contexts to handle values ...
void setVecElemOperand(const StaticInst *si, int idx, const TheISA::VecElem val) override
Record a vector register being set to a value.
#define panic(...)
This implements a cprintf based panic() function.
std::vector< short > _destMiscRegIdx
Indexes of the destination misc.
T * get() const
Directly access the pointer itself without taking a reference.
Generated on Tue Jun 22 2021 15:28:26 for gem5 by doxygen 1.8.17