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

Roman Divacky rdivacky at freebsd.org
Tue Jun 14 12:47:27 PDT 2011


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: powerpc32-vaarg.patch
Type: text/x-diff
Size: 6973 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110614/7b9b9314/attachment.patch>


More information about the llvm-commits mailing list