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),
67 regs(staticInst->numSrcRegs(), staticInst->numDestRegs()),
84 : staticInst(_staticInst), traceData(NULL),
85 regs(staticInst->numSrcRegs(), staticInst->numDestRegs()),
108 instFlags[RecordResult] =
true;
109 instFlags[Predicate] =
true;
110 instFlags[MemAccPredicate] =
true;
124 if (cpu->instcount > 1500) {
129 assert(cpu->instcount <= 1500);
133 "DynInst: [sn:%lli] Instruction created. Instcount for %s = %i\n",
134 seqNum, cpu->name(), cpu->instcount);
138 cpu->snList.insert(seqNum);
143 template <
class Impl>
160 "DynInst: [sn:%lli] Instruction destroyed. Instcount for %s = %i\n",
161 seqNum, cpu->name(), cpu->instcount);
164 cpu->snList.erase(seqNum);
170 template <
class Impl>
174 std::set<InstSeqNum>::iterator sn_it = cpu->snList.begin();
177 while (sn_it != cpu->snList.end()) {
178 cprintf(
"%i: [sn:%lli] not destroyed\n",
count, (*sn_it));
185 template <
class Impl>
189 cprintf(
"T%d : %#08d `", threadNumber,
pc.instAddr());
190 std::cout << staticInst->disassemble(
pc.instAddr());
194 template <
class Impl>
198 std::ostringstream
s;
199 s <<
"T" << threadNumber <<
" : 0x" <<
pc.instAddr() <<
" "
200 << staticInst->disassemble(
pc.instAddr());
205 template <
class Impl>
209 DPRINTF(IQ,
"[sn:%lli] has %d ready out of %d sources. RTI %d)\n",
210 seqNum, readyRegs+1, numSrcRegs(), readyToIssue());
211 if (++readyRegs == numSrcRegs()) {
216 template <
class Impl>
220 regs.readySrcIdx(src_idx,
true);
224 template <
class Impl>
232 for (
int i = 1;
i < numSrcRegs(); ++
i) {
233 if (!regs.readySrcIdx(
i))
242 template <
class Impl>
248 if (!isPinnedRegsRenamed() || isPinnedRegsSquashDone())
257 for (
int idx = 0; idx < numDestRegs(); idx++) {
261 if (isPinnedRegsWritten())
265 setPinnedRegsSquashDone();
270 #endif//__CPU_BASE_DYN_INST_IMPL_HH__