[PATCH] Fix AAPCS-VFP non-compliance when returning HFA from variadic function

Oliver Stannard oliver.stannard at arm.com
Thu Jan 16 01:57:05 PST 2014


Hi,

According to the "Procedure Call Standard for the ARM Architecture", a
function which returns a struct larger than 4 bytes must pass the return
value in memory provided by the caller. This is true when using the base
AAPCS calling convention, and the AAPCS-VFP extension when the callee is
variadic. However, clang currently does not do the necessary transformation
to return the result in memory when using the AAPCS-VFP calling convention,
and when the struct is a homogeneous aggregate of floating-point types.

The attached patch corrects this behaviour. Note, that this change will
break ABI backwards-compatibility with previous versions of clang/llvm.

Oliver
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arm-hfa-variadic-vfp-return.patch
Type: application/octet-stream
Size: 2586 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140116/11c3dc64/attachment.obj>


More information about the cfe-commits mailing list