diff options
author | Mitch Hayenga <mitch.hayenga@arm.com> | 2014-09-03 07:42:36 -0400 |
---|---|---|
committer | Mitch Hayenga <mitch.hayenga@arm.com> | 2014-09-03 07:42:36 -0400 |
commit | daedc5a49127eb91036291af1619bbc98016aff0 (patch) | |
tree | 6bf2ac8d871cd9b4c49c3aa0dc48096f76dfe427 /src/cpu/pred/2bit_local.hh | |
parent | ecd53009712da59a98ad3c13ed20aaa8e8cd7e29 (diff) | |
download | gem5-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/2bit_local.hh')
-rw-r--r-- | src/cpu/pred/2bit_local.hh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cpu/pred/2bit_local.hh b/src/cpu/pred/2bit_local.hh index 23683cc67..e008c6232 100644 --- a/src/cpu/pred/2bit_local.hh +++ b/src/cpu/pred/2bit_local.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 @@ -92,6 +92,9 @@ class LocalBP : public BPredUnit */ void update(Addr branch_addr, bool taken, void *bp_history, bool squashed); + void retireSquashed(void *bp_history) + { assert(bp_history == NULL); } + void squash(void *bp_history) { assert(bp_history == NULL); } |