[llvm-commits] [PATCH, PowerPC] Fix PR13947 - Incorrect passing of floats

Hal Finkel hfinkel at anl.gov
Thu Oct 11 08:19:32 PDT 2012


----- Original Message -----
> From: "William J. Schmidt" <wschmidt at linux.vnet.ibm.com>
> To: llvm-commits at cs.uiuc.edu
> Sent: Thursday, October 11, 2012 10:10:52 AM
> Subject: [llvm-commits] [PATCH,	PowerPC] Fix PR13947 - Incorrect passing of floats
> 
> This patch addresses PR13947.
> 
> For function calls on the 64-bit PowerPC SVR4 target, each parameter
> is mapped to as many doublewords in the parameter save area as
> necessary to hold the parameter.  The first 13 non-varargs
> floating-point values are passed in registers; any additional
> floating-point parameters are passed in the parameter save area.  A
> single-precision floating-point parameter (32 bits) must be mapped to
> the second (rightmost, low-order) word of its assigned doubleword
> slot.
> 
> Currently LLVM violates this ABI requirement by mapping such a
> parameter to the first (leftmost, high-order) word of its assigned
> doubleword slot.  This is internally self-consistent but will not
> interoperate correctly with libraries compiled with an ABI-compliant
> compiler.
> 
> This patch corrects the problem by adjusting the parameter addressing
> on both sides of the calling convention.
> 
> Tested on powerpc64-unknown-linux-gnu with no new regressions.  Is
> this
> ok to commit?

LGTM.

 -Hal

> 
> Thanks,
> Bill
> 
> --
> Bill Schmidt, Ph.D.
> IBM Advance Toolchain for PowerLinux
> IBM Linux Technology Center
> wschmidt at us.ibm.com
> wschmidt at linux.vnet.ibm.com
> 
> 
> 
> 
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 

-- 
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-commits mailing list