inorder: squash from memory stall
authorKorey Sewell <ksewell@umich.edu>
Thu, 24 Jun 2010 02:09:49 +0000 (22:09 -0400)
committerKorey Sewell <ksewell@umich.edu>
Thu, 24 Jun 2010 02:09:49 +0000 (22:09 -0400)
this applies to multithreading models which would like to squash a thread on memory stall

src/cpu/inorder/resources/fetch_seq_unit.cc

index 03663881c1a3f8bd182db9f34e750995b6ac0326..0d22226a5b3f2d306fba26caec61918a1753a5b4 100644 (file)
@@ -228,7 +228,11 @@ FetchSeqUnit::squash(DynInstPtr inst, int squash_stage,
             tid, squash_stage);
 
     InstSeqNum done_seq_num = inst->bdelaySeqNum;
-    Addr new_PC = inst->readPredTarg();
+
+    // Handles the case where we are squashing because of something that is
+    // not a branch...like a memory stall
+    Addr new_PC = (inst->isControl()) ?
+        inst->readPredTarg() : inst->readPC() + instSize;
 
     if (squashSeqNum[tid] <= done_seq_num &&
         lastSquashCycle[tid] == curTick) {