gem5/src
Arthur Perais 497cc2d373 cpu: disallow speculative update of branch predictor tables (o3)
The Minor and o3 cpu models share the branch prediction
code. Minor relies on the BPredUnit::squash() function
to update the branch predictor tables on a branch mispre-
diction. This is fine because Minor executes in-order, so
the update is on the correct path. However, this causes the
branch predictor to be updated on out-of-order branch
mispredictions when using the o3 model, which should not
be the case.

This patch guards against speculative update of the branch
prediction tables. On a branch misprediction, BPredUnit::squash()
calls BpredUnit::update(..., squashed = true). The underlying
branch predictor tests against the value of squashed. If it is
true, it restores any speculatively updated internal state
it might have (e.g., global/local branch history), then returns.
If false, it updates its prediction tables. Previously, exist-
ing predictors did not test against the "squashed" parameter.

To accomodate for this change, the Minor model must now call
BPredUnit::squash() then BPredUnit::update(..., squashed = false)
on branch mispredictions. Before, calling BpredUnit::squash()
performed the prediction tables update.

The effect is a slight MPKI improvement when using the o3
model. A further patch should perform the same modifications
for the indirect target predictor and BTB (less critical).

Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
2016-12-21 15:07:16 -06:00
..
arch arm: provide correct timer availability in ID_PFR1 register 2016-12-19 11:03:28 -06:00
base arch: [Patch 1/5] Added RISC-V base instruction set RV64I 2016-11-30 17:10:28 -05:00
cpu cpu: disallow speculative update of branch predictor tables (o3) 2016-12-21 15:07:16 -06:00
dev dev: Include DmaDevice in NULL builds 2016-12-19 16:25:38 +00:00
doc sim: Adding support for power models 2016-06-06 17:16:44 +01:00
doxygen MEM: Put memory system document into doxygen 2012-09-25 11:49:41 -05:00
gpu-compute hsail: remove the panic guarding function directives 2016-12-02 18:01:42 -05:00
kern alpha: Remove ALPHA tru64 support and associated tests 2016-11-17 04:54:14 -05:00
mem ruby: Make MessageBuffers actually finite sized 2016-12-20 11:38:24 -06:00
proto cpu: Support virtual addr in elastic traces 2015-12-07 16:42:16 -06:00
python python: Export periodicStatDump 2016-12-19 16:25:39 +00:00
sim sim: Remove redundant buildEnv import 2016-12-19 16:25:37 +00:00
unittest style: remove trailing whitespace 2016-02-06 17:21:18 -08:00
Doxyfile Doxygen: Update the version of the Doxyfile 2012-10-11 06:38:42 -04:00
SConscript scons: fix sanitizer flags with multiple sanitizers 2016-11-28 12:44:54 -05:00