[LLVMdev] should PEI::calculateFrameObjectOffsets align the stack?

Chris Lattner sabre at nondot.org
Fri Oct 6 14:41:32 PDT 2006

On Fri, 6 Oct 2006, [UTF-8] Rafael Esp?ndola wrote:
> In ARM the stack should be 8 bytes aligned during function calls. A
> function that has at least one  function call then has a stack size of
> 8 bytes. PEI::calculateFrameObjectOffsets corretly computes this
> correctly.
> The problem is that the alignment is computed before adding space for
> the call frame size. This is done in emitProlog. Currently the ARM
> backend has a bug in that it doesn't align the new stack.

This sounds like the ADJCALLSTACK DOWN/UP 'instructions' around the call 
aren't set right, or you have declared a SP offset.  It doesn't look like 
the ARM backend does this, so this is probably the problem.

If the PEI stuff knows the right offsets, it should do the alignment for 



More information about the llvm-dev mailing list