summaryrefslogtreecommitdiff
path: root/src/cpu/inorder/resources/bpred_unit.hh
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2010-06-25 17:42:35 -0400
committerKorey Sewell <ksewell@umich.edu>2010-06-25 17:42:35 -0400
commit868181f24df3d48170a4676e9df96928a0608e40 (patch)
tree66bca2a3c6fc7366db7c470a1af563ea1e27c9e2 /src/cpu/inorder/resources/bpred_unit.hh
parent6bfd766f2c6c93cca3f79482bfddf7e6cdeb455e (diff)
downloadgem5-868181f24df3d48170a4676e9df96928a0608e40.tar.xz
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.
Diffstat (limited to 'src/cpu/inorder/resources/bpred_unit.hh')
-rw-r--r--src/cpu/inorder/resources/bpred_unit.hh5
1 files changed, 3 insertions, 2 deletions
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 {