[Patch] Fix stack alignment for calls without frame setup or destroy

Andrew Turner andrew at fubar.geek.nz
Thu Apr 18 15:48:54 PDT 2013


On Thu, 18 Apr 2013 09:28:03 +0100
Renato Golin <renato.golin at linaro.org> wrote:

> On 18 April 2013 03:35, Andrew Turner <andrew at fubar.geek.nz> wrote:
> 
> > The attached patch makes tells the calling function it needs to
> > adjust it's stack when it contains a call opcode.
> >
> 
> Hi Andrew,
> 
> Isn't that a bit too generic a fix for such a specific case?

I don't think so. Clang should adjust the stack when a function calls
another, this patch fixes the case where the function call doesn't have
the frame setup or destroy opcodes around it. I'm not sure how common
this is as I have only observed it with __aeabi_read_tp, and there may
be other cases that have yet to been observed.

Andrew



More information about the llvm-commits mailing list