[llvm-commits] [patch] Fix ARM varg functions with 5 or more regular arguments

Rafael Espindola espindola at google.com
Thu Oct 29 19:45:25 PDT 2009


The attached patch fixes functions like

void f (int a1, int a2, int a3, int a4, int a5,...)

In ARMTargetLowering::LowerFormalArguments if the function has 4 or
more regular arguments we correctly don't save the r0-r3 registers on
the stack. The problem is that we also set VarArgsFrameIndex using an
offset of 0, which is only correct if the function has exactly 4
regular arguments.

Is the patch OK with a testcase? I promises to write one before committing :-)

Cheers,
-- 
Rafael Ávila de Espíndola
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-varg.patch
Type: text/x-diff
Size: 1096 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20091029/589213b5/attachment.patch>


More information about the llvm-commits mailing list