ARM: assembler: introduce bl_r macro
Add a bl_r macro that abstract the difference between the ways indirect calls are performed on older and newer ARM architecture revisions. The main difference is to prefer blx instructions over explicit LR assignments when possible, as these tend to confuse the prediction logic in out-of-order cores when speculating across a function return. Signed-off-by: NArd Biesheuvel <ardb@kernel.org> Reviewed-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Tested-by: NKeith Packard <keithpac@amazon.com> Tested-by: NMarc Zyngier <maz@kernel.org> Tested-by: Vladimir Murzin <vladimir.murzin@arm.com> # ARMv7M
Showing
想要评论请 注册 或 登录