diff options
author | Dam Sunwoo <dam.sunwoo@arm.com> | 2014-09-03 07:42:41 -0400 |
---|---|---|
committer | Dam Sunwoo <dam.sunwoo@arm.com> | 2014-09-03 07:42:41 -0400 |
commit | 5008a20aa4585f052c145a0d6d72c5aab75e77a7 (patch) | |
tree | e3f962fe7311c23384cb75a5626d3b2f889be1ae /src | |
parent | 476c6fe36884ac435ca2f14eee79d5019d4f554f (diff) | |
download | gem5-5008a20aa4585f052c145a0d6d72c5aab75e77a7.tar.xz |
cpu: fix bimodal predictor to use correct global history reg
A small bug in the bimodal predictor caused significant degradation in
performance on some benchmarks. This was caused by using the wrong
globalHistoryReg during the update phase. This patches fixes the bug
and brings the performance to normal level.
Diffstat (limited to 'src')
-rw-r--r-- | src/cpu/pred/bi_mode.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cpu/pred/bi_mode.cc b/src/cpu/pred/bi_mode.cc index cb4365ed5..604afee55 100644 --- a/src/cpu/pred/bi_mode.cc +++ b/src/cpu/pred/bi_mode.cc @@ -167,7 +167,7 @@ BiModeBP::update(Addr branchAddr, bool taken, void *bpHistory, bool squashed) unsigned choiceHistoryIdx = ((branchAddr >> instShiftAmt) & choiceHistoryMask); unsigned globalHistoryIdx = (((branchAddr >> instShiftAmt) - ^ globalHistoryReg) + ^ history->globalHistoryReg) & globalHistoryMask); assert(choiceHistoryIdx < choicePredictorSize); |