From: Maximilien Breughe Date: Fri, 14 May 2010 03:45:57 +0000 (-0400) Subject: BPRED: Fixed the treshold-bug in the tournament predictor. X-Git-Tag: stable_2012_02_02~1409^2~1 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fc746c2268bfceded0014749cddd8234fa55a35a;p=gem5.git BPRED: Fixed the treshold-bug in the tournament predictor. Suppose the saturating counters of a branch predictor contain n bits. When the counter is between 0 and (2^(n-1) - 1), boundaries included, the branch is predicted as not taken. When the counter is between 2^(n-1) and (2^n - 1), boundaries included, the branch is predicted as taken. --- diff --git a/src/cpu/pred/tournament.cc b/src/cpu/pred/tournament.cc index 223e45333..96ee87615 100644 --- a/src/cpu/pred/tournament.cc +++ b/src/cpu/pred/tournament.cc @@ -104,7 +104,6 @@ TournamentBP::TournamentBP(unsigned _localPredictorSize, // @todo: Allow for different thresholds between the predictors. threshold = (1 << (localCtrBits - 1)) - 1; - threshold = threshold / 2; } inline