diff options
author | Maximilien Breughe <Maximilien.Breughe@elis.ugent.be> | 2010-03-22 16:59:12 -0400 |
---|---|---|
committer | Maximilien Breughe <Maximilien.Breughe@elis.ugent.be> | 2010-03-22 16:59:12 -0400 |
commit | 0170e851de4b06f8839f25bfa9551e02ec4f24b3 (patch) | |
tree | 46dac0cd420d1b711e6e955d2a73935c9324ff08 /src/cpu/inorder/resources/bpred_unit.cc | |
parent | 4ac245737d4dd9e49ef7e3f00d851593ab7579d2 (diff) | |
download | gem5-0170e851de4b06f8839f25bfa9551e02ec4f24b3.tar.xz |
inorder: fix squash bug in branch predictor
Diffstat (limited to 'src/cpu/inorder/resources/bpred_unit.cc')
-rw-r--r-- | src/cpu/inorder/resources/bpred_unit.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cpu/inorder/resources/bpred_unit.cc b/src/cpu/inorder/resources/bpred_unit.cc index 0e8526fa1..c9674a0b5 100644 --- a/src/cpu/inorder/resources/bpred_unit.cc +++ b/src/cpu/inorder/resources/bpred_unit.cc @@ -343,6 +343,8 @@ BPredUnit::squash(const InstSeqNum &squashed_sn, // corresponding to the squash. In that case, don't bother trying to // fix up the entry. if (!pred_hist.empty()) { + if(pred_hist.front().seqNum==squashed_sn){ + assert(pred_hist.front().seqNum == squashed_sn); if (pred_hist.front().usedRAS) { ++RASIncorrect; @@ -353,6 +355,7 @@ BPredUnit::squash(const InstSeqNum &squashed_sn, BTB.update(pred_hist.front().PC, corr_target, tid); pred_hist.pop_front(); + } } } |