diff options
Diffstat (limited to 'src/cpu/inorder/resources')
-rw-r--r-- | src/cpu/inorder/resources/bpred_unit.cc | 9 | ||||
-rw-r--r-- | src/cpu/inorder/resources/bpred_unit.hh | 3 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/cpu/inorder/resources/bpred_unit.cc b/src/cpu/inorder/resources/bpred_unit.cc index 778366532..1a458e1d6 100644 --- a/src/cpu/inorder/resources/bpred_unit.cc +++ b/src/cpu/inorder/resources/bpred_unit.cc @@ -284,7 +284,8 @@ BPredUnit::update(const InstSeqNum &done_sn, ThreadID tid) // Update the branch predictor with the correct results. BPUpdate(predHist[tid].back().pc.instAddr(), predHist[tid].back().predTaken, - predHist[tid].back().bpHistory); + predHist[tid].back().bpHistory, + false); predHist[tid].pop_back(); } @@ -367,7 +368,7 @@ BPredUnit::squash(const InstSeqNum &squashed_sn, } BPUpdate((*hist_it).pc.instAddr(), actually_taken, - pred_hist.front().bpHistory); + pred_hist.front().bpHistory, true); // only update BTB on branch taken right??? if (actually_taken) @@ -425,12 +426,12 @@ BPredUnit::BPLookup(Addr inst_PC, void * &bp_history) void -BPredUnit::BPUpdate(Addr inst_PC, bool taken, void *bp_history) +BPredUnit::BPUpdate(Addr inst_PC, bool taken, void *bp_history, bool squashed) { if (predictor == Local) { localBP->update(inst_PC, taken, bp_history); } else if (predictor == Tournament) { - tournamentBP->update(inst_PC, taken, bp_history); + tournamentBP->update(inst_PC, taken, bp_history, squashed); } else { panic("Predictor type is unexpected value!"); } diff --git a/src/cpu/inorder/resources/bpred_unit.hh b/src/cpu/inorder/resources/bpred_unit.hh index 33ca4a0c6..b5d12d2db 100644 --- a/src/cpu/inorder/resources/bpred_unit.hh +++ b/src/cpu/inorder/resources/bpred_unit.hh @@ -160,9 +160,10 @@ class BPredUnit * @param taken Whether the branch was taken or not taken. * @param bp_history Pointer to the branch predictor state that is * associated with the branch lookup that is being updated. + * @param squashed if the branch in question was squashed or not * @todo Make this update flexible enough to handle a global predictor. */ - void BPUpdate(Addr instPC, bool taken, void *bp_history); + void BPUpdate(Addr instPC, bool taken, void *bp_history, bool squashed); /** * Updates the BTB with the target of a branch. |