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.
This commit is contained in:
parent
476c6fe368
commit
5008a20aa4
1 changed files with 1 additions and 1 deletions
|
@ -167,7 +167,7 @@ BiModeBP::update(Addr branchAddr, bool taken, void *bpHistory, bool squashed)
|
||||||
unsigned choiceHistoryIdx = ((branchAddr >> instShiftAmt)
|
unsigned choiceHistoryIdx = ((branchAddr >> instShiftAmt)
|
||||||
& choiceHistoryMask);
|
& choiceHistoryMask);
|
||||||
unsigned globalHistoryIdx = (((branchAddr >> instShiftAmt)
|
unsigned globalHistoryIdx = (((branchAddr >> instShiftAmt)
|
||||||
^ globalHistoryReg)
|
^ history->globalHistoryReg)
|
||||||
& globalHistoryMask);
|
& globalHistoryMask);
|
||||||
|
|
||||||
assert(choiceHistoryIdx < choicePredictorSize);
|
assert(choiceHistoryIdx < choicePredictorSize);
|
||||||
|
|
Loading…
Reference in a new issue