O3PCU: Split loads and stores that cross cache line boundaries.
[gem5.git] / src / cpu / base_dyn_inst_impl.hh
index acf8af9cf4fb9c97873ad6a896dfdb07c76b1212..70c91cedaa1e0b6f18a98b5e883752c48ec342db 100644 (file)
 
 #include "base/cprintf.hh"
 #include "base/trace.hh"
-
-#include "sim/faults.hh"
+#include "config/the_isa.hh"
+#include "cpu/base_dyn_inst.hh"
 #include "cpu/exetrace.hh"
 #include "mem/request.hh"
-
-#include "cpu/base_dyn_inst.hh"
+#include "sim/faults.hh"
 
 #define NOHASH
 #ifndef NOHASH
@@ -73,7 +72,7 @@ BaseDynInst<Impl>::BaseDynInst(StaticInstPtr _staticInst,
     seqNum = seq_num;
 
     bool nextIsMicro =
-        staticInst->isMicroOp() && !staticInst->isLastMicroOp();
+        staticInst->isMicroop() && !staticInst->isLastMicroop();
 
     PC = inst_PC;
     microPC = inst_MicroPC;
@@ -101,12 +100,12 @@ BaseDynInst<Impl>::BaseDynInst(TheISA::ExtMachInst inst,
                                Addr pred_PC, Addr pred_NPC,
                                Addr pred_MicroPC,
                                InstSeqNum seq_num, ImplCPU *cpu)
-  : staticInst(inst), traceData(NULL), cpu(cpu)
+  : staticInst(inst, inst_PC), traceData(NULL), cpu(cpu)
 {
     seqNum = seq_num;
 
     bool nextIsMicro =
-        staticInst->isMicroOp() && !staticInst->isLastMicroOp();
+        staticInst->isMicroop() && !staticInst->isLastMicroop();
 
     PC = inst_PC;
     microPC = inst_MicroPC;
@@ -168,18 +167,21 @@ BaseDynInst<Impl>::initVars()
     // Initialize the fault to be NoFault.
     fault = NoFault;
 
-    ++instcount;
+#ifndef NDEBUG
+    ++cpu->instcount;
 
-    if (instcount > 1500) {
-        cpu->dumpInsts();
+    if (cpu->instcount > 1500) {
 #ifdef DEBUG
+        cpu->dumpInsts();
         dumpSNList();
 #endif
-        assert(instcount <= 1500);
+        assert(cpu->instcount <= 1500);
     }
 
-    DPRINTF(DynInst, "DynInst: [sn:%lli] Instruction created. Instcount=%i\n",
-            seqNum, instcount);
+    DPRINTF(DynInst,
+        "DynInst: [sn:%lli] Instruction created. Instcount for %s = %i\n",
+        seqNum, cpu->name(), cpu->instcount);
+#endif
 
 #ifdef DEBUG
     cpu->snList.insert(seqNum);
@@ -199,10 +201,13 @@ BaseDynInst<Impl>::~BaseDynInst()
 
     fault = NoFault;
 
-    --instcount;
+#ifndef NDEBUG
+    --cpu->instcount;
 
-    DPRINTF(DynInst, "DynInst: [sn:%lli] Instruction destroyed. Instcount=%i\n",
-            seqNum, instcount);
+    DPRINTF(DynInst,
+        "DynInst: [sn:%lli] Instruction destroyed. Instcount for %s = %i\n",
+        seqNum, cpu->name(), cpu->instcount);
+#endif
 #ifdef DEBUG
     cpu->snList.erase(seqNum);
 #endif