diff options
author | Dibakar Gope <gope@wisc.edu> | 2015-04-13 17:33:57 -0500 |
---|---|---|
committer | Dibakar Gope <gope@wisc.edu> | 2015-04-13 17:33:57 -0500 |
commit | 34ad1123ee5927e3b1503f07649620a533d3eab9 (patch) | |
tree | e655941704abbbafad01966bfa188449a336aaef /src/cpu/pred/bi_mode.cc | |
parent | e596e524985cfb1f4d46aceebe69bb7fcd94cf04 (diff) | |
download | gem5-34ad1123ee5927e3b1503f07649620a533d3eab9.tar.xz |
cpu: re-organizes the branch predictor structure.
Committed by: Nilay Vaish <nilay@cs.wisc.edu>
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); +} |