summaryrefslogtreecommitdiff
path: root/src/cpu/pred/tournament.hh
diff options
context:
space:
mode:
authorMitch Hayenga <mitch.hayenga@arm.com>2014-09-03 07:42:36 -0400
committerMitch Hayenga <mitch.hayenga@arm.com>2014-09-03 07:42:36 -0400
commitdaedc5a49127eb91036291af1619bbc98016aff0 (patch)
tree6bf2ac8d871cd9b4c49c3aa0dc48096f76dfe427 /src/cpu/pred/tournament.hh
parentecd53009712da59a98ad3c13ed20aaa8e8cd7e29 (diff)
downloadgem5-daedc5a49127eb91036291af1619bbc98016aff0.tar.xz
cpu: Fix incorrect speculative branch predictor behavior
When a branch mispredicted gem5 would squash all history after and including the mispredicted branch. However, the mispredicted branch is still speculative and its history is required to rollback state if another, older, branch mispredicts. This leads to things like RAS corruption.
Diffstat (limited to 'src/cpu/pred/tournament.hh')
-rw-r--r--src/cpu/pred/tournament.hh4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cpu/pred/tournament.hh b/src/cpu/pred/tournament.hh
index 39fff5bfb..88334a8c0 100644
--- a/src/cpu/pred/tournament.hh
+++ b/src/cpu/pred/tournament.hh
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 ARM Limited
+ * Copyright (c) 2011, 2014 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
@@ -104,6 +104,8 @@ class TournamentBP : public BPredUnit
*/
void update(Addr branch_addr, bool taken, void *bp_history, bool squashed);
+ void retireSquashed(void *bp_history);
+
/**
* Restores the global branch history on a squash.
* @param bp_history Pointer to the BPHistory object that has the