Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2aed1e72 authored by Marc Zyngier's avatar Marc Zyngier Committed by Sami Tolvanen
Browse files

UPSTREAM: arm64: alternative: Allow immediate branch as alternative instruction



Since all branches are PC-relative on AArch64, these instructions
cannot be used as an alternative with the simplistic approach
we currently have (the immediate has been computed from
the .altinstr_replacement section, and end-up being completely off
if the target is outside of the replacement sequence).

This patch handles the branch instructions in a different way,
using the insn framework to recompute the immediate, and generate
the right displacement in the above case.

Acked-by: default avatarWill Deacon <will.deacon@arm.com>
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>

Bug: 31432001
Change-Id: I5bf4896acaccf94a78aa52ca4484289ce75eb1d1
(cherry picked from commit 7616fc8bcd7ef4975a294337d6cd3007b8c18746)
Signed-off-by: default avatarSami Tolvanen <samitolvanen@google.com>
parent 840c59f8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment