cpu: Fix incorrect speculative branch predictor behavior
authorMitch Hayenga <mitch.hayenga@arm.com>
Wed, 3 Sep 2014 11:42:36 +0000 (07:42 -0400)
committerMitch Hayenga <mitch.hayenga@arm.com>
Wed, 3 Sep 2014 11:42:36 +0000 (07:42 -0400)
commitdaedc5a49127eb91036291af1619bbc98016aff0
tree6bf2ac8d871cd9b4c49c3aa0dc48096f76dfe427
parentecd53009712da59a98ad3c13ed20aaa8e8cd7e29
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.
src/cpu/pred/2bit_local.hh
src/cpu/pred/bpred_unit.hh
src/cpu/pred/bpred_unit_impl.hh
src/cpu/pred/tournament.cc
src/cpu/pred/tournament.hh