diff options
Diffstat (limited to 'src/cpu/pred/bi_mode.cc')
-rw-r--r-- | src/cpu/pred/bi_mode.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/cpu/pred/bi_mode.cc b/src/cpu/pred/bi_mode.cc index 604afee55..c2a41cd4d 100644 --- a/src/cpu/pred/bi_mode.cc +++ b/src/cpu/pred/bi_mode.cc @@ -36,8 +36,8 @@ #include "base/intmath.hh" #include "cpu/pred/bi_mode.hh" -BiModeBP::BiModeBP(const Params *params) - : BPredUnit(params), instShiftAmt(params->instShiftAmt), +BiModeBP::BiModeBP(const BiModeBPParams *params) + : BPredUnit(params), globalHistoryReg(0), globalHistoryBits(ceilLog2(params->globalPredictorSize)), choicePredictorSize(params->choicePredictorSize), @@ -77,7 +77,7 @@ BiModeBP::BiModeBP(const Params *params) * chooses the taken array and the taken array predicts taken. */ void -BiModeBP::uncondBranch(void * &bpHistory) +BiModeBP::uncondBranch(Addr pc, void * &bpHistory) { BPHistory *history = new BPHistory; history->globalHistoryReg = globalHistoryReg; @@ -243,3 +243,9 @@ BiModeBP::updateGlobalHistReg(bool taken) (globalHistoryReg << 1); globalHistoryReg &= historyRegisterMask; } + +BiModeBP* +BiModeBPParams::create() +{ + return new BiModeBP(this); +} |