We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi all,
Is there any document related to the branch predictor algorithm utilized in the ARMV7 and ARMV8 and how the software (ABI) can be aptly developed ac-complying the same ?
Hi Pravinchan,
In general, we do not document specifics of the algorithms used by our cores for branch prediction. You should note that, in any case, this is an implementation issue and not an architectural one. For instance, Cortex-A53 and Cortex-57 are both ARMv8-A cores (and are therefore architecturally identical) but may implement completely different branch prediction schemes.
The only architecturally-defined aspect is the programmer's interface to control certain aspects of branch prediction (this is done via CP15 in ARMv7 and via named system registers in ARMv8 but the mechanism is the same). This is usually restricted to high-level operations such as enabling/disabling prediction and the ability to invalidate branch predictor caches. If a particular implementation has caches which store branch information, then the architecture will usually mandate certain maintenance operations which must be carried out on, for instance, a context switch.
Hope this helps.
Chris