cpu: Fix bi-mode branch predictor thresholds

When different sizes were set for the choice and global saturation
counter (e.g. ex5_big), the threshold calculation used the wrong
size. Thus the branch predictor always predicted "not taken" for
choice > global.

Change-Id: I076549ff1482e2280cef24a0d16b7bb2122d4110
Reviewed-on: https://gem5-review.googlesource.com/4560
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
This commit is contained in:
Rico Amslinger
2017-08-24 15:07:44 +02:00
parent 29d7c72b89
commit 725b19a815

View File

@@ -68,8 +68,8 @@ BiModeBP::BiModeBP(const BiModeBPParams *params)
globalHistoryMask = globalPredictorSize - 1;
choiceThreshold = (ULL(1) << (choiceCtrBits - 1)) - 1;
takenThreshold = (ULL(1) << (choiceCtrBits - 1)) - 1;
notTakenThreshold = (ULL(1) << (choiceCtrBits - 1)) - 1;
takenThreshold = (ULL(1) << (globalCtrBits - 1)) - 1;
notTakenThreshold = (ULL(1) << (globalCtrBits - 1)) - 1;
}
/*