From 5008a20aa4585f052c145a0d6d72c5aab75e77a7 Mon Sep 17 00:00:00 2001 From: Dam Sunwoo Date: Wed, 3 Sep 2014 07:42:41 -0400 Subject: 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. --- src/cpu/pred/bi_mode.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cpu/pred') diff --git a/src/cpu/pred/bi_mode.cc b/src/cpu/pred/bi_mode.cc index cb4365ed5..604afee55 100644 --- a/src/cpu/pred/bi_mode.cc +++ b/src/cpu/pred/bi_mode.cc @@ -167,7 +167,7 @@ BiModeBP::update(Addr branchAddr, bool taken, void *bpHistory, bool squashed) unsigned choiceHistoryIdx = ((branchAddr >> instShiftAmt) & choiceHistoryMask); unsigned globalHistoryIdx = (((branchAddr >> instShiftAmt) - ^ globalHistoryReg) + ^ history->globalHistoryReg) & globalHistoryMask); assert(choiceHistoryIdx < choicePredictorSize); -- cgit v1.2.3