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

Oliver Stannard oliver.stannard at arm.com
Mon Jan 20 03:59:39 PST 2014


Updated patch attached.

Oliver

-----Original Message-----
From: Anton Korobeynikov [mailto:anton at korobeynikov.info] 
Sent: 17 January 2014 13:02
To: Oliver Stannard
Cc: Tim Northover; cfe-commits at cs.uiuc.edu
Subject: Re: [PATCH] Fix AAPCS-VFP non-compliance when returning HFA from variadic function

Oliver,

Can't you just set IsHA to be false in case of variadic functions?

On Fri, Jan 17, 2014 at 1:43 PM, Oliver Stannard
<Oliver.Stannard at arm.com> wrote:
> Updated patch attached.
>
> Oliver
>
> -----Original Message-----
> From: Tim Northover [mailto:t.p.northover at gmail.com]
> Sent: 16 January 2014 16:35
> To: Oliver Stannard
> Cc: Renato Golin; cfe-commits at cs.uiuc.edu
> Subject: Re: [PATCH] Fix AAPCS-VFP non-compliance when returning HFA from variadic function
>
> On 16 January 2014 16:02, Oliver Stannard <oliver.stannard at arm.com> wrote:
>> I had another look, and it turns out that there is a very similar bug
>> affecting HFA function arguments to variadic functions. I have attached an
>> updated version of my patch which fixes this.
>
> I still think this is expressed at the wrong level. It's not that HFAs
> are particularly special in variadic functions, but that AAPCS_VFP
> rules simply don't apply to variadics. HFAs don't exist as a concept,
> just like they don't for APCS or AAPCS.
>
> I think you get away with it because passing them as an HFA would be
> (e.g. "double, double, double") works with the backend anyway, but
> they should go as any other struct ([3 x i64] by the looks of it in
> that case).
>
> Cheers.
>
> Tim.
>
>
> -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.
>
> ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No:  2557590
> ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No:  2548782
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>



-- 
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arm-hfa-variadic-vfp-calling-convention-3.patch
Type: application/octet-stream
Size: 5484 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140120/68dd4e54/attachment.obj>


More information about the cfe-commits mailing list