[llvm-commits] [PATCH]: ppc32 va_arg() implementation

Chris Lattner sabre at nondot.org
Mon Jun 27 16:52:55 PDT 2011


On Jun 27, 2011, at 10:00 AM, Roman Divacky wrote:

> Now with a test case, the testcase tests i32 (uses gpr_index).
> f32 (uses fpr_index) and i64 (uses aligned gpr_index).

I'm really not the best person to review this, but I don't have any objections to it.

-Chris

> 
> OK to commit?
> 
> On Tue, Jun 14, 2011 at 09:47:27PM +0200, Roman Divacky wrote:
>> Hi,
>> 
>> the attached patch implements va_arg() lowering on ppc32.
>> Ints (8, 16, 32 and also 64 bits that need special treatment) work,
>> floats don't work (neither with gcc - we should warn when someone tries
>> to use them on ppc32 probably), doubles do work. Both passing via
>> register_save_area and overflow_area works.
>> 
>> I tried with stuff like
>> 
>>  foo(1, 7, 0xf00ba4cafeLL, 3.0f, 2, 4, 5, (6LL << 32) + 5LL, 7, 8, 9, 10, 11,  0);
>>  bar(1, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 0.0);
>> 
>> I'll have some test cases soon too.
>> 
>> This only works at -O0 because of unrelated bugs in the PowerPC backend.
>> 
>> Comments?
>> 
>> roman
> 
> 
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 
> <ppc32-vaarg.ll><powerpc32-vaarg.patch>





More information about the llvm-commits mailing list