[LLVMdev] problems defining the stack layout

Rafael EspĂ­ndola rafael.espindola at gmail.com
Wed Aug 16 09:42:14 PDT 2006


> I'm not familiar with the ARM ISA, so I don't know the right answer.  The
> OffsetOfLocalArea is used for ISAs (like X86) where the call sequence
> modifies the stack pointer (in the case of X86, the call instruction
> pushes a 4/8-byte return value).  If ARM is like PPC, where the return
> address is implicitly copied into a physreg, then you should probably use
> OffsetOfLocalArea=0 and just ask for LR to be spilled to a specific
> location (e.g. see the PPC backend).
The problem was that I was generating hard coded loads and stores for
the link register. I was trying to shift the local variables, but this
isn't the correct solution. I have now implemented
getCalleeSaveSpillSlots, so that the link register is treated like any
other callee save register.

Thanks,
Rafael



More information about the llvm-dev mailing list