[lld] [lld][ARM] Don't emit veneers for wraparound branches. (PR #165263)
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 28 07:25:03 PDT 2025
smithp35 wrote:
> > I've put what I've found in the various Arm ARMs. From what I've been able to find it seems fine, apart from v8-A and above, where I think it is UNKNOWN (and hence can't be relied on). This could just be my reading of the Arm ARM though as the UNKNOWN parts may not be related to branch instructions.
>
> Hmmm, you had a completely different methodology from me in checking the Arm ARM. I didn't try to find any high-level text about address space wraparound in general. I made a beeline for the architecture pseudocode of the BL instruction and checked the semantics specified in that.
>
I had a memory that there was something written about this in the ABI or the Arm ARM so I tried to find it. Unfortunately I couldn't. The pseudo code looked a bit ambiguous with just PC + imm32, but thanks for following through on the rules for bitstrings to show that this is permitted. The UNKNOWN parts did seem to be related to a non-branch instruction at 0xfffffffc wrapping round back to 0x0.
Assuming the test comments can be addressed I can approve.
https://github.com/llvm/llvm-project/pull/165263
More information about the llvm-commits
mailing list