]> granicus.if.org Git - clang/commit
[PowerPC64] Fix passing of single-vector-member structs to match ABI.
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Tue, 23 Jul 2013 22:15:57 +0000 (22:15 +0000)
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>
Tue, 23 Jul 2013 22:15:57 +0000 (22:15 +0000)
commitb199310f56d6695780b146baf2b823b8676e4525
tree2b156dc16cccbb9686f3ebb7b35806cff6aa7e70
parent75fcef9a16e98b95fa980f1b2c4fc0d4090955d8
[PowerPC64] Fix passing of single-vector-member structs to match ABI.

The 64-bit PowerPC ELF ABI requires a struct that contains a single
vector member to be passed in a vector register as though the wrapping
struct were not present.  Instead we were passing this as a byval
struct.

The same logic was already present for floating-point arguments, so
this patch just extends the logic to handle vector types.  The new
test case verifies that clang coerces the parameter and annotates it
as inreg.

Thanks,
Bill

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186993 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/TargetInfo.cpp
test/CodeGen/ppc64-struct-onevect.c [new file with mode: 0644]