Make sure the value of PC is actually updated now that the instruction target isn...
authorGabe Black <gblack@eecs.umich.edu>
Thu, 28 Dec 2006 19:29:17 +0000 (14:29 -0500)
committerGabe Black <gblack@eecs.umich.edu>
Thu, 28 Dec 2006 19:29:17 +0000 (14:29 -0500)
--HG--
extra : convert_revision : 4c00a219ac1d82abea78e4e8d70f529a435fdfe2

src/cpu/o3/bpred_unit_impl.hh

index dbc603082db32a16268b065e210e4d67919ed553..84c50b4dacfa40a99d107e67c0ff635e5ed69bb9 100644 (file)
@@ -149,7 +149,7 @@ BPredUnit<Impl>::predict(DynInstPtr &inst, Addr &PC, unsigned tid)
     using TheISA::MachInst;
 
     bool pred_taken = false;
-    Addr target;
+    Addr target = PC;
 
     ++lookups;
 
@@ -233,6 +233,8 @@ BPredUnit<Impl>::predict(DynInstPtr &inst, Addr &PC, unsigned tid)
         }
     }
 
+    PC = target;
+
     predHist[tid].push_front(predict_record);
 
     DPRINTF(Fetch, "[tid:%i]: predHist.size(): %i\n", tid, predHist[tid].size());