41 #ifndef __CPU_BASE_DYN_INST_IMPL_HH__ 42 #define __CPU_BASE_DYN_INST_IMPL_HH__ 51 #include "config/the_isa.hh" 54 #include "debug/DynInst.hh" 55 #include "debug/IQ.hh" 64 : staticInst(_staticInst), cpu(cpu),
118 if (
cpu->instcount > 1500) {
123 assert(
cpu->instcount <= 1500);
127 "DynInst: [sn:%lli] Instruction created. Instcount for %s = %i\n",
137 template <
class Impl>
154 "DynInst: [sn:%lli] Instruction destroyed. Instcount for %s = %i\n",
164 template <
class Impl>
168 std::set<InstSeqNum>::iterator sn_it =
cpu->snList.begin();
171 while (sn_it !=
cpu->snList.end()) {
172 cprintf(
"%i: [sn:%lli] not destroyed\n", count, (*sn_it));
179 template <
class Impl>
188 template <
class Impl>
192 std::ostringstream
s;
199 template <
class Impl>
203 DPRINTF(IQ,
"[sn:%lli] has %d ready out of %d sources. RTI %d)\n",
210 template <
class Impl>
219 template <
class Impl>
237 template <
class Impl>
265 #endif//__CPU_BASE_DYN_INST_IMPL_HH__
virtual const std::string & disassemble(Addr pc, const Loader::SymbolTable *symtab=nullptr) const
Return string representation of disassembled instruction.
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.
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.
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.
GenericISA::DelaySlotPCState< MachInst > PCState
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)