cpu: Use PCStateBase in the branch predictors.

Use PCStateBase instead of TheISA::PCState in the branch predictors.

Change-Id: I0b0867bc09b6191a54d7658813c0b9656c436811
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52055
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Earl Ou <shunhsingou@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Gabe Black
2021-10-14 02:41:50 -07:00
parent 732e0bfe9e
commit 8ef9f70fcb
12 changed files with 116 additions and 116 deletions

View File

@@ -371,9 +371,8 @@ BaseSimpleCPU::preExecute()
const InstSeqNum cur_sn(0);
set(t_info.predPC, thread->pcState());
const bool predict_taken(
branchPred->predict(curStaticInst, cur_sn,
t_info.predPC->as<TheISA::PCState>(),
curThread));
branchPred->predict(curStaticInst, cur_sn, *t_info.predPC,
curThread));
if (predict_taken)
++t_info.execContextStats.numPredictedBranches;
@@ -489,7 +488,8 @@ BaseSimpleCPU::advancePC(const Fault &fault)
branchPred->update(cur_sn, curThread);
} else {
// Mis-predicted branch
branchPred->squash(cur_sn, thread->pcState(), branching, curThread);
branchPred->squash(cur_sn, thread->pcState(), branching,
curThread);
++t_info.execContextStats.numBranchMispred;
}
}