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),
83 : staticInst(_staticInst), traceData(NULL), macroop(_macroop)
105 instFlags[RecordResult] =
true;
106 instFlags[Predicate] =
true;
107 instFlags[MemAccPredicate] =
true;
121 if (cpu->instcount > 1500) {
126 assert(cpu->instcount <= 1500);
130 "DynInst: [sn:%lli] Instruction created. Instcount for %s = %i\n",
131 seqNum, cpu->name(), cpu->instcount);
135 cpu->snList.insert(seqNum);
140 template <
class Impl>
157 "DynInst: [sn:%lli] Instruction destroyed. Instcount for %s = %i\n",
158 seqNum, cpu->name(), cpu->instcount);
161 cpu->snList.erase(seqNum);
167 template <
class Impl>
171 std::set<InstSeqNum>::iterator sn_it = cpu->snList.begin();
174 while (sn_it != cpu->snList.end()) {
175 cprintf(
"%i: [sn:%lli] not destroyed\n",
count, (*sn_it));
182 template <
class Impl>
186 cprintf(
"T%d : %#08d `", threadNumber,
pc.instAddr());
187 std::cout << staticInst->disassemble(
pc.instAddr());
191 template <
class Impl>
195 std::ostringstream
s;
196 s <<
"T" << threadNumber <<
" : 0x" <<
pc.instAddr() <<
" "
197 << staticInst->disassemble(
pc.instAddr());
202 template <
class Impl>
206 DPRINTF(IQ,
"[sn:%lli] has %d ready out of %d sources. RTI %d)\n",
207 seqNum, readyRegs+1, numSrcRegs(), readyToIssue());
208 if (++readyRegs == numSrcRegs()) {
213 template <
class Impl>
217 _readySrcRegIdx[src_idx] =
true;
222 template <
class Impl>
230 for (
int i = 1;
i < numSrcRegs(); ++
i) {
231 if (!_readySrcRegIdx[
i])
240 template <
class Impl>
246 if (!isPinnedRegsRenamed() || isPinnedRegsSquashDone())
255 for (
int idx = 0; idx < numDestRegs(); idx++) {
259 if (isPinnedRegsWritten())
263 setPinnedRegsSquashDone();
268 #endif//__CPU_BASE_DYN_INST_IMPL_HH__