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

Tim Northover t.p.northover at gmail.com
Thu Jan 16 04:03:28 PST 2014


Hi Oliver,

> 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.

Doesn't the issue go further than that? The PCS says (5.5): "A
variadic function is always marshaled as for the base standard."

Which seems to mean the correct change is basically replacing any
check for "AAPCS_VFP" with "AAPCS_VFP && !isVariadic" (with any
simplifications that might be possible).

Cheers.

Tim.



More information about the cfe-commits mailing list