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), traceData(NULL), macroop(_macroop)
79 : staticInst(_staticInst), traceData(NULL), macroop(_macroop)
99 instFlags[RecordResult] =
true;
100 instFlags[Predicate] =
true;
117 if (cpu->instcount > 1500) {
122 assert(cpu->instcount <= 1500);
126 "DynInst: [sn:%lli] Instruction created. Instcount for %s = %i\n",
127 seqNum, cpu->name(), cpu->instcount);
131 cpu->snList.insert(seqNum);
137 template <
class Impl>
154 "DynInst: [sn:%lli] Instruction destroyed. Instcount for %s = %i\n",
155 seqNum, cpu->name(), cpu->instcount);
158 cpu->snList.erase(seqNum);
166 template <
class Impl>
170 std::set<InstSeqNum>::iterator sn_it = cpu->snList.begin();
173 while (sn_it != cpu->snList.end()) {
174 cprintf(
"%i: [sn:%lli] not destroyed\n", count, (*sn_it));
181 template <
class Impl>
185 cprintf(
"T%d : %#08d `", threadNumber,
pc.instAddr());
186 std::cout << staticInst->disassemble(
pc.instAddr());
190 template <
class Impl>
194 std::ostringstream
s;
195 s <<
"T" << threadNumber <<
" : 0x" <<
pc.instAddr() <<
" "
196 << staticInst->disassemble(
pc.instAddr());
201 template <
class Impl>
205 DPRINTF(IQ,
"[sn:%lli] has %d ready out of %d sources. RTI %d)\n",
206 seqNum, readyRegs+1, numSrcRegs(), readyToIssue());
207 if (++readyRegs == numSrcRegs()) {
212 template <
class Impl>
216 _readySrcRegIdx[src_idx] =
true;
221 template <
class Impl>
229 for (
int i = 1;
i < numSrcRegs(); ++
i) {
230 if (!_readySrcRegIdx[
i])
237 #endif//__CPU_BASE_DYN_INST_IMPL_HH__
decltype(nullptr) constexpr NoFault
~BaseDynInst()
BaseDynInst destructor.
InstSeqNum seqNum
The sequence number of the instruction.
Declaration of a request, the overall memory request consisting of the parts of the request that are ...
void markSrcRegReady()
Records that one of the source registers is ready.
bool eaSrcsReady()
Returns whether or not the eff.
TheISA::RegIndex RegIndex
TheISA::PCState pc
PC state for this instruction.
BaseDynInst(const StaticInstPtr &staticInst, const StaticInstPtr ¯oop, TheISA::PCState pc, TheISA::PCState predPC, InstSeqNum seq_num, ImplCPU *cpu)
BaseDynInst constructor given a binary instruction.
GenericISA::SimplePCState< MachInst > PCState
Defines a dynamic instruction context.
void initVars()
Function to initialize variables in the constructors.
TheISA::PCState predPC
Predicted PC state after this instruction.
void dump()
Dumps out contents of this BaseDynInst.
void cprintf(const char *format, const Args &...args)