[LLVMdev] [AArch64] Question about far call

Tim Northover t.p.northover at gmail.com
Thu Jun 19 23:05:16 PDT 2014


Hi Weiming,

On 20 June 2014 02:01, Weiming Zhao <weimingz at codeaurora.org> wrote:
> PS. The above test works fine with arm v7 targart. (clang emits “bl foo” and
> ld generates veneer)

This is what I'd expect ld to do in the AArch64 case too. Most of the
time the destination (or its stub) is in range, so general codegen
shouldn't be penalised by having to emit movz/movk sequences &
indirect branches for each call.

Unfortunately, the AArch64 (& ARM) ELF ABI appears to make it a QoI
issue by using vague wording in section 4.6.7 ("a linker *may* use a
veneer..."). I'm still surprised they haven't done that yet though; I
wonder if there's a bug lying around.

Cheers.

Tim.




More information about the llvm-dev mailing list