43 #ifndef __CPU_BASE_DYN_INST_IMPL_HH__ 44 #define __CPU_BASE_DYN_INST_IMPL_HH__ 53 #include "config/the_isa.hh" 56 #include "debug/DynInst.hh" 57 #include "debug/IQ.hh" 66 : staticInst(_staticInst), cpu(cpu),
123 if (
cpu->instcount > 1500) {
128 assert(
cpu->instcount <= 1500);
132 "DynInst: [sn:%lli] Instruction created. Instcount for %s = %i\n",
142 template <
class Impl>
159 "DynInst: [sn:%lli] Instruction destroyed. Instcount for %s = %i\n",
169 template <
class Impl>
173 std::set<InstSeqNum>::iterator sn_it =
cpu->snList.begin();
176 while (sn_it !=
cpu->snList.end()) {
177 cprintf(
"%i: [sn:%lli] not destroyed\n", count, (*sn_it));
184 template <
class Impl>
193 template <
class Impl>
197 std::ostringstream
s;
204 template <
class Impl>
208 DPRINTF(IQ,
"[sn:%lli] has %d ready out of %d sources. RTI %d)\n",
215 template <
class Impl>
224 template <
class Impl>
242 template <
class Impl>
270 #endif//__CPU_BASE_DYN_INST_IMPL_HH__
void setSquashed()
Sets this instruction as squashed.
decltype(nullptr) constexpr NoFault
~BaseDynInst()
BaseDynInst destructor.
std::bitset< NumStatus > status
The status of this BaseDynInst.
InstSeqNum seqNum
The sequence number of the instruction.
unsigned memReqFlags
The memory request flags (from translation).
uint8_t readyRegs
How many source registers are ready.
int16_t lqIdx
Load queue index.
Declaration of a request, the overall memory request consisting of the parts of the request that are ...
Fault fault
The kind of fault this instruction has generated.
uint8_t * memData
Pointer to the data for the memory access.
virtual const std::string & disassemble(Addr pc, const SymbolTable *symtab=0) const
Return string representation of disassembled instruction.
short asid
data address space ID, for loads & stores.
Trace::InstRecord * traceData
InstRecord that tracks this instructions.
void markSrcRegReady()
Records that one of the source registers is ready.
PhysRegIdPtr renamedDestRegIdx(int idx) const
Returns the physical register index of the i'th destination register.
void incrNumPinnedWrites()
int8_t numSrcRegs() const
Returns the number of source registers.
void incrNumPinnedWritesToComplete()
bool isPinnedRegsRenamed() const
Returns whether pinned registers are renamed.
bool isPinnedRegsWritten() const
Returns whether destination registers are written.
bool readyToIssue() const
Returns whether or not this instruction is ready to issue.
std::bitset< MaxFlags > instFlags
const StaticInstPtr staticInst
The StaticInst used by this BaseDynInst.
void setPinnedRegsSquashDone()
Sets dest registers' status updated after squash.
TheISA::PCState pc
PC state for this instruction.
std::bitset< MaxInstSrcRegs > _readySrcRegIdx
Whether or not the source register is ready.
bool eaSrcsReady() const
Returns whether or not the eff.
int16_t sqIdx
Store queue index.
BaseDynInst(const StaticInstPtr &staticInst, const StaticInstPtr ¯oop, TheISA::PCState pc, TheISA::PCState predPC, InstSeqNum seq_num, ImplCPU *cpu)
BaseDynInst constructor given a binary instruction.
ImplCPU * cpu
Pointer to the Impl's CPU object.
GenericISA::SimplePCState< MachInst > PCState
int8_t numDestRegs() const
Returns the number of destination registers.
Addr effAddr
The effective virtual address (lds & stores only).
Defines a dynamic instruction context.
const StaticInstPtr macroop
The Macroop if one exists.
void initVars()
Function to initialize variables in the constructors.
TheISA::PCState predPC
Predicted PC state after this instruction.
bool isPinnedRegsSquashDone() const
Return whether dest registers' pinning status updated after squash.
ThreadID threadNumber
The thread this instruction is from.
void dump()
Dumps out contents of this BaseDynInst.
Instruction has committed.
Addr physEffAddr
The effective physical address.
void setCanIssue()
Sets this instruction as ready to issue.
void cprintf(const char *format, const Args &...args)