From 34ad1123ee5927e3b1503f07649620a533d3eab9 Mon Sep 17 00:00:00 2001 From: Dibakar Gope Date: Mon, 13 Apr 2015 17:33:57 -0500 Subject: cpu: re-organizes the branch predictor structure. Committed by: Nilay Vaish --- src/cpu/pred/2bit_local.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/cpu/pred/2bit_local.cc') diff --git a/src/cpu/pred/2bit_local.cc b/src/cpu/pred/2bit_local.cc index 0fd0a10d3..36ca1593e 100644 --- a/src/cpu/pred/2bit_local.cc +++ b/src/cpu/pred/2bit_local.cc @@ -34,11 +34,10 @@ #include "cpu/pred/2bit_local.hh" #include "debug/Fetch.hh" -LocalBP::LocalBP(const Params *params) +LocalBP::LocalBP(const LocalBPParams *params) : BPredUnit(params), localPredictorSize(params->localPredictorSize), - localCtrBits(params->localCtrBits), - instShiftAmt(params->instShiftAmt) + localCtrBits(params->localCtrBits) { if (!isPowerOf2(localPredictorSize)) { fatal("Invalid local predictor size!\n"); @@ -153,6 +152,12 @@ LocalBP::getLocalIndex(Addr &branch_addr) } void -LocalBP::uncondBranch(void *&bp_history) +LocalBP::uncondBranch(Addr pc, void *&bp_history) { } + +LocalBP* +LocalBPParams::create() +{ + return new LocalBP(this); +} -- cgit v1.2.3