44 #ifndef __CPU_O3_DYN_INST_HH__
45 #define __CPU_O3_DYN_INST_HH__
49 #include "arch/isa_traits.hh"
50 #include "config/the_isa.hh"
64 typedef typename Impl::O3CPU
O3CPU;
131 int32_t dispatchTick;
133 int32_t completeTick;
175 return this->
cpu->readMiscReg(
197 bool no_squash_from_TC = this->
thread->noSquashFromTC;
198 this->
thread->noSquashFromTC =
true;
201 this->
cpu->setMiscReg(
204 this->
thread->noSquashFromTC = no_squash_from_TC;
210 for (
int idx = 0; idx < this->
numDestRegs(); idx++) {
217 this->
cpu->readIntReg(prev_phys_reg));
221 this->
cpu->readFloatRegBits(prev_phys_reg));
225 this->
cpu->readCCReg(prev_phys_reg));
303 #if THE_ISA == MIPS_ISA
306 panic(
"MIPS MT not defined for O3 CPU.\n");
312 panic(
"MIPS MT not defined for O3 CPU.\n");
336 #endif // __CPU_O3_ALPHA_DYN_INST_HH__
TheISA::ExtMachInst ExtMachInst
Extended machine instruction type.
bool simPalCheck(int palFunc)
Check for special simulator handling of specific PAL calls.
FloatRegBits readFloatRegOperandBits(const StaticInst *si, int idx)
Reads a floating point register in its binary format, instead of by value.
IntReg readIntRegOperand(const StaticInst *si, int idx)
Reads an integer register.
void setFloatRegOperandBits(const StaticInst *si, int idx, FloatRegBits val)
Records an fp register being set to an integer value.
TheISA::FloatRegBits FloatRegBits
FloatReg readFloatRegOperand(const StaticInst *si, int idx)
Reads a floating point register of single register width.
Fault fault
The kind of fault this instruction has generated.
T * get() const
Directly access the pointer itself without taking a reference.
RegIndex destRegIdx(int i) const
Return logical index (architectural reg num) of i'th destination reg.
std::array< PhysRegIndex, TheISA::MaxInstDestRegs > _destRegIdx
Physical register index of the destination registers of this instruction.
void setCCRegOperand(const StaticInst *si, int idx, CCReg val)
Records a CC register being set to a value.
TheISA::FloatReg FloatReg
virtual Fault execute(ExecContext *xc, Trace::InstRecord *traceData) const =0
Trace::InstRecord * traceData
InstRecord that tracks this instructions.
MiscReg readRegOtherThread(int misc_reg, ThreadID tid)
Fault completeAcc(PacketPtr pkt)
Completes the access.
void trap(const Fault &fault)
Traps to handle specified fault.
Fault hwrei()
Calls hardware return from error interrupt.
TheISA::RegIndex RegIndex
Logical register index type.
void setIntRegOperand(const StaticInst *si, int idx, IntReg val)
Records an integer register being set to a value.
const int MaxMiscDestRegs
TheISA::FloatReg FloatReg
CCReg readCCRegOperand(const StaticInst *si, int idx)
uint8_t _numDestMiscRegs
Number of destination misc.
void setIntRegOperand(const StaticInst *si, int idx, IntReg val)
TheISA::FloatRegBits FloatRegBits
void setFloatRegOperand(const StaticInst *si, int idx, FloatReg val)
Records an fp register being set to a value.
uint64_t Tick
Tick count type.
void syscall(int64_t callnum, Fault *fault)
Emulates a syscall.
std::array< MiscReg, TheISA::MaxMiscDestRegs > _destMiscRegVal
Values to be written to the destination misc.
Fault memAccess()
Does the memory access part of a memory instruction.
std::array< short, TheISA::MaxMiscDestRegs > _destMiscRegIdx
Indexes of the destination 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.
const StaticInstPtr staticInst
The StaticInst used by this BaseDynInst.
TheISA::PCState pc
PC state for this instruction.
Fault calcEA()
Calculates EA part of a memory instruction.
Fault execute()
Executes the instruction.
int8_t numDestRegs() const
Returns the number of destination registers.
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
RegIndex srcRegIdx(int i) const
Return logical index (architectural reg num) of i'th source reg.
TheISA::MiscReg readMiscRegOperand(const StaticInst *si, int idx)
Reads a misc.
void updateMiscRegs()
Called at the commit stage to update the misc.
virtual const StaticInstPtr & eaCompInst() const
Memory references only: returns "fake" instruction representing the effective address part of the mem...
void setMiscRegOperand(const StaticInst *si, int idx, const MiscReg &val)
Sets a misc.
int16_t ThreadID
Thread index/ID type.
PhysRegIndex prevDestRegIdx(int idx) const
Returns the physical register index of the previous physical register that remapped to the same logic...
void setCCRegOperand(const StaticInst *si, int idx, CCReg val)
Records a CC register being set to a value.
ImplCPU * cpu
Pointer to the Impl's CPU object.
void setRegOtherThread(int misc_reg, MiscReg val, ThreadID tid)
TheISA::MachInst MachInst
Binary machine instruction type.
Impl::O3CPU O3CPU
Typedef for the CPU.
GenericISA::SimplePCState< MachInst > PCState
MiscReg readMiscReg(int misc_reg)
Reads a misc.
void setMiscReg(int misc_reg, const MiscReg &val)
Sets a misc.
void setFloatRegOperandBits(const StaticInst *si, int idx, FloatRegBits val)
Records an fp register being set to an integer value.
std::array< PhysRegIndex, TheISA::MaxInstSrcRegs > _srcRegIdx
Physical register index of the source registers of this instruction.
TheISA::MiscReg MiscReg
Misc register index type.
Base, ISA-independent static instruction class.
Defines a dynamic instruction context.
const StaticInstPtr macroop
The Macroop if one exists.
TheISA::PCState predPC
Predicted PC state after this instruction.
RegClass regIdxToClass(TheISA::RegIndex reg_idx, TheISA::RegIndex *rel_reg_idx=NULL)
Map a 'unified' architectural register index to its register class.
TheISA::IntReg IntReg
Integer register index type.
virtual const StaticInstPtr & memAccInst() const
Memory references only: returns "fake" instruction representing the memory access part of the memory ...
ThreadID threadNumber
The thread this instruction is from.
void setFloatRegOperand(const StaticInst *si, int idx, FloatReg val)
Records an fp register being set to a value.
std::shared_ptr< FaultBase > Fault
ImplState * thread
Pointer to the thread state.
void initVars()
Initializes variables.
Fault initiateAcc()
Initiates the access.