summaryrefslogtreecommitdiff
path: root/src/cpu/pred/bpred_unit.cc
diff options
context:
space:
mode:
authorMitch Hayenga <mitch.hayenga@arm.com>2016-04-05 11:44:27 -0500
committerMitch Hayenga <mitch.hayenga@arm.com>2016-04-05 11:44:27 -0500
commit3f6874cb295695a225fca6825bfe24a4b97641fd (patch)
treee5a64a9441bc2934fce326d2753e63d126a8c4a0 /src/cpu/pred/bpred_unit.cc
parent1097aa1638dc3b1e009738932908ab5c253b461b (diff)
downloadgem5-3f6874cb295695a225fca6825bfe24a4b97641fd.tar.xz
cpu: Fix BTB threading oversight
The extant BTB code doesn't hash on the thread id but does check the thread id for 'btb hits'. This results in 1-thread of a multi-threaded workload taking a BTB entry, and all other threads missing for the same branch missing.
Diffstat (limited to 'src/cpu/pred/bpred_unit.cc')
-rw-r--r--src/cpu/pred/bpred_unit.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cpu/pred/bpred_unit.cc b/src/cpu/pred/bpred_unit.cc
index 8bb84f836..c38927c8d 100644
--- a/src/cpu/pred/bpred_unit.cc
+++ b/src/cpu/pred/bpred_unit.cc
@@ -59,7 +59,8 @@ BPredUnit::BPredUnit(const Params *params)
predHist(numThreads),
BTB(params->BTBEntries,
params->BTBTagSize,
- params->instShiftAmt),
+ params->instShiftAmt,
+ params->numThreads),
RAS(numThreads),
instShiftAmt(params->instShiftAmt)
{