changeset 1ae84c76066b in /z/repo/gem5 details: http://repo.gem5.org/gem5?cmd=changeset;node=1ae84c76066b description: cpu: Resolve targets of predicted 'taken' decode for O3
The target of taken conditional direct branches does not need to be resolved in IEW: the target can be computed at decode, usually using the decoded instruction word and the PC. The higher-than-necessary penalty is taken only on conditional branches that are predicted taken but miss in the BTB. Thus, this is mostly inconsequential on IPC if the BTB is big/associative enough (fewer capacity/conflict misses). Nonetheless, what gem5 simulates is not representative of how conditional branch targets can be handled. Signed-off-by: Jason Lowe-Power <ja...@lowepower.com> diffstat: src/cpu/o3/decode_impl.hh | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diffs (16 lines): diff -r 9af039ea0c1e -r 1ae84c76066b src/cpu/o3/decode_impl.hh --- a/src/cpu/o3/decode_impl.hh Wed Dec 21 15:04:06 2016 -0600 +++ b/src/cpu/o3/decode_impl.hh Wed Dec 21 15:05:24 2016 -0600 @@ -719,7 +719,11 @@ } // Go ahead and compute any PC-relative branches. - if (inst->isDirectCtrl() && inst->isUncondCtrl()) { + // This includes direct unconditional control and + // direct conditional control that is predicted taken. + if (inst->isDirectCtrl() && + (inst->isUncondCtrl() || inst->readPredTaken())) + { ++decodeBranchResolved; if (!(inst->branchTarget() == inst->readPredTarg())) { _______________________________________________ gem5-dev mailing list gem5-dev@gem5.org http://m5sim.org/mailman/listinfo/gem5-dev