summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cpu/pred/bpred_unit.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/cpu/pred/bpred_unit.cc b/src/cpu/pred/bpred_unit.cc
index a768cc19e..2bfd90140 100644
--- a/src/cpu/pred/bpred_unit.cc
+++ b/src/cpu/pred/bpred_unit.cc
@@ -371,7 +371,9 @@ BPredUnit::squash(const InstSeqNum &squashed_sn, ThreadID tid)
// This call should delete the bpHistory.
squash(tid, pred_hist.front().bpHistory);
- iPred.deleteDirectionInfo(tid, pred_hist.front().indirectHistory);
+ if (useIndirect) {
+ iPred.deleteDirectionInfo(tid, pred_hist.front().indirectHistory);
+ }
DPRINTF(Branch, "[tid:%i]: Removing history for [sn:%i] "
"PC %s.\n", tid, pred_hist.front().seqNum,
@@ -452,8 +454,10 @@ BPredUnit::squash(const InstSeqNum &squashed_sn,
pred_hist.front().bpHistory, true, pred_hist.front().inst,
corrTarget.instAddr());
- iPred.changeDirectionPrediction(tid, pred_hist.front().indirectHistory,
- actually_taken);
+ if (useIndirect) {
+ iPred.changeDirectionPrediction(tid,
+ pred_hist.front().indirectHistory, actually_taken);
+ }
if (actually_taken) {
if (hist_it->wasReturn && !hist_it->usedRAS) {