summaryrefslogtreecommitdiff
path: root/src/cpu/o3/bpred_unit.hh
diff options
context:
space:
mode:
authorMrinmoy Ghosh <mrinmoy.ghosh@arm.com>2012-02-13 12:26:25 -0600
committerMrinmoy Ghosh <mrinmoy.ghosh@arm.com>2012-02-13 12:26:25 -0600
commit9b05e96b9efdb9cdcc4e40ef9c96b1228df7a175 (patch)
tree54471a114f0d7bc09853bb48e8161fe5fec79d12 /src/cpu/o3/bpred_unit.hh
parentfd90c3676d94520b98a9af29af09c1f8a2858465 (diff)
downloadgem5-9b05e96b9efdb9cdcc4e40ef9c96b1228df7a175.tar.xz
BPred: Fix RAS to handle predicated call/return instructions.
Change RAS to fix issues with predicated call/return instructions. Handled all cases in the life of a predicated call and return instruction.
Diffstat (limited to 'src/cpu/o3/bpred_unit.hh')
-rw-r--r--src/cpu/o3/bpred_unit.hh18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/cpu/o3/bpred_unit.hh b/src/cpu/o3/bpred_unit.hh
index d3ae93b38..673472b69 100644
--- a/src/cpu/o3/bpred_unit.hh
+++ b/src/cpu/o3/bpred_unit.hh
@@ -1,4 +1,16 @@
/*
+ * Copyright (c) 2011 ARM Limited
+ * All rights reserved
+ *
+ * The license below extends only to copyright in the software and shall
+ * not be construed as granting a license to any other intellectual
+ * property including but not limited to intellectual property relating
+ * to a hardware implementation of the functionality of the software
+ * licensed hereunder. You may use the software subject to the license
+ * terms below provided that you ensure that this notice is replicated
+ * unmodified and in its entirety in all distributions of the software,
+ * modified or unmodified, in source code or in binary form.
+ *
* Copyright (c) 2004-2005 The Regents of The University of Michigan
* All rights reserved.
*
@@ -196,7 +208,7 @@ class BPredUnit
ThreadID _tid)
: seqNum(seq_num), pc(instPC), RASTarget(0), RASIndex(0),
tid(_tid), predTaken(pred_taken), usedRAS(0),
- wasCall(0), bpHistory(bp_history)
+ wasCall(0), wasReturn(0), validBTB(0), bpHistory(bp_history)
{}
bool operator==(const PredictorHistory &entry) const {
@@ -227,6 +239,10 @@ class BPredUnit
/** Whether or not the instruction was a call. */
bool wasCall;
+ /** Whether or not the instruction was a return. */
+ bool wasReturn;
+ /** Whether or not the instruction had a valid BTB entry. */
+ bool validBTB;
/** Pointer to the history object passed back from the branch
* predictor. It is used to update or restore state of the
* branch predictor.