From fc746c2268bfceded0014749cddd8234fa55a35a Mon Sep 17 00:00:00 2001 From: Maximilien Breughe Date: Thu, 13 May 2010 23:45:57 -0400 Subject: [PATCH] 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. --- src/cpu/pred/tournament.cc | 1 - 1 file changed, 1 deletion(-) 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