[PATCH] [X86] ABI breaking change for x86-32: pass 3 vector arguments in-register instead of 4, except on Darwin
Michael Kuperstein
michael.m.kuperstein at intel.com
Sun May 10 01:21:09 PDT 2015
Hi rnk, hjl.tools, grosbach, joerg, hfinkel, rjmccall,
This changes the ABI used on 32-bit x86 for passing vector arguments.
Currently, clang passes 4 arguments in-register, and everything else on the stack, on all platforms.
This is different from the behavior of gcc, icc, and msvc, all of which pass 3 arguments in-register. The 3-register convention is documented, unofficially, in Agner's calling convention guide, and, officially, in the recently released version 1.0 of the i386 psABI (see https://01.org/sites/default/files/file_attach/intel386-psabi-1.0.pdf ).
This patch changes the behavior on all platforms except Darwin. The Darwin ABI is kept as is, because:
a) Clang is the mainstream compiler for the platform, which means that existing code is much more likely to rely on the current ABI.
b) The current behavior is documented (in the OS X ABI Function Call Guide).
See also PR21510.
Please feel free to add more reviewers that have a stake in this.
http://reviews.llvm.org/D9644
Files:
lib/Target/X86/X86CallingConv.td
test/CodeGen/X86/fp-trunc.ll
test/CodeGen/X86/illegal-vector-args-return.ll
test/CodeGen/X86/x86-32-vector-calling-conv.ll
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9644.25424.patch
Type: text/x-patch
Size: 8543 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150510/602fd0b8/attachment.bin>
More information about the llvm-commits
mailing list