[LLVMdev] GCC/LLVM frame pointer incompatibility on ARM
Renato Golin
renato.golin at linaro.org
Wed Jul 16 00:55:19 PDT 2014
On 16 July 2014 08:45, Tim Northover <t.p.northover at gmail.com> wrote:
> What are the chances of getting GCC to change here? It's entirely a
> bike-shedding argument, but there are a couple of reasons to prefer
> LLVM's choice. It's most consistent with what *is* required in the
> AArch64 ABI, and it means fp really points to the frame record, not
> some random point half way through it.
I'm not an expert in x86_64 asm, but it seems that both AArch64 and
x86_64 GCC do the same:
x86_64:
pushq %rbp
movq %rsp, %rbp
subq $16, %rsp
AArch64:
stp x29, x30, [sp, -32]!
add x29, sp, 0
which would indicate that LLVM's implementation on ARM is the most
consistent. I'm guessing ARM GCC's implementation was not an accident,
but a long forgotten hack... :/
cheers,
--renato
More information about the llvm-dev
mailing list