cpu: Fix bi-mode branch predictor thresholds
[gem5.git] / src / cpu / pred / bi_mode.cc
index 355d0d8f7f4128619c39f671cae5d89bbfda78a3..e8fda7387a997b8e5aebf48fb7fe025fb57ae9f1 100644 (file)
  * Implementation of a bi-mode branch predictor
  */
 
+#include "cpu/pred/bi_mode.hh"
+
 #include "base/bitfield.hh"
 #include "base/intmath.hh"
-#include "cpu/pred/bi_mode.hh"
 
 BiModeBP::BiModeBP(const BiModeBPParams *params)
     : BPredUnit(params),
@@ -67,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;
 }
 
 /*