[LLVMdev] GCC/LLVM frame pointer incompatibility on ARM
Tim Northover
t.p.northover at gmail.com
Wed Jul 16 00:45:10 PDT 2014
> As has been mentioned several times (*), LLVM and GCC setup frame pointer to
> point to different stack slots on ARM. GCC's fp points to stack slot holding
> lr while LLVM's fp points at the next slot.
This looks flipped from my tests. Both create an { fp, lr } struct;
GCC sets current fp to the address of lr in that struct; LLVM sets
current fp to the address of fp in that struct.
> Is this incompatibility intentional/desired or we could somehow unify GCC
> and LLVM in this regard?
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.
Cheers.
Tim.
More information about the llvm-dev
mailing list