[LLVMdev] should PEI::calculateFrameObjectOffsets align the stack?
sabre at nondot.org
Sat Oct 7 12:43:00 PDT 2006
On Sat, 7 Oct 2006, [UTF-8] Rafael Esp?ndola wrote:
>> 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.
> The ARM backend currently doesn't use a frame pointer. It uses the
> same technique of the PPC backend to avoid add/subs around calls. In
> the PPC backend we have:
That is irrelevant. The PEI code needs to know how much stack space is
required for each call to allocate and align the stack frame properly. It
gets this info from the ADJCALLSTACK instructions.
Further, you *do* need to have a frame pointer if the function contains
any dynamic allocas. In that case, the SP isn't fixed within a function.
You may not care about this right now, but it is required to support C99
VLA's and the 'alloca' C function.
More information about the llvm-dev