From 868181f24df3d48170a4676e9df96928a0608e40 Mon Sep 17 00:00:00 2001 From: Korey Sewell Date: Fri, 25 Jun 2010 17:42:35 -0400 Subject: inorder: Return Address Stack bug the nextPC was getting sent to the branch predictor not the current PC, so the RAS was returning the wrong PC and mispredicting everything. --- src/cpu/inorder/resources/bpred_unit.hh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/cpu/inorder/resources/bpred_unit.hh') diff --git a/src/cpu/inorder/resources/bpred_unit.hh b/src/cpu/inorder/resources/bpred_unit.hh index 8f4ef593d..881bfcc95 100644 --- a/src/cpu/inorder/resources/bpred_unit.hh +++ b/src/cpu/inorder/resources/bpred_unit.hh @@ -83,11 +83,11 @@ class BPredUnit * Predicts whether or not the instruction is a taken branch, and the * target of the branch if it is taken. * @param inst The branch instruction. - * @param PC The predicted PC is passed back through this parameter. + * @param pred_PC The predicted PC is passed back through this parameter. * @param tid The thread id. * @return Returns if the branch is taken or not. */ - bool predict(ThePipeline::DynInstPtr &inst, Addr &PC, ThreadID tid); + bool predict(ThePipeline::DynInstPtr &inst, Addr &pred_PC, ThreadID tid); // @todo: Rename this function. void BPUncond(void * &bp_history); @@ -173,6 +173,7 @@ class BPredUnit void dump(); private: + int instSize; Resource *res; struct PredictorHistory { -- cgit v1.2.3