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:Will Deacon <will.deacon@arm.com> Signed-off-by:
Marc Zyngier <marc.zyngier@arm.com> Signed-off-by:
Catalin Marinas <catalin.marinas@arm.com> Bug: 31432001 Change-Id: I5bf4896acaccf94a78aa52ca4484289ce75eb1d1 (cherry picked from commit 7616fc8bcd7ef4975a294337d6cd3007b8c18746) Signed-off-by:
Sami Tolvanen <samitolvanen@google.com>
Loading
Please register or sign in to comment