This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Implement C _FloatN, _FloatNx types [version 6]


On Sat, 3 Sep 2016, Andreas Schwab wrote:

> On Aug 17 2016, Joseph Myers <joseph@codesourcery.com> wrote:
> 
> > Index: gcc/testsuite/gcc.dg/torture/float32-basic.c
> > ===================================================================
> > --- gcc/testsuite/gcc.dg/torture/float32-basic.c	(nonexistent)
> > +++ gcc/testsuite/gcc.dg/torture/float32-basic.c	(working copy)
> > @@ -0,0 +1,9 @@
> > +/* Test _Float32.  */
> > +/* { dg-do run } */
> > +/* { dg-options "" } */
> > +/* { dg-add-options float32 } */
> > +/* { dg-require-effective-target float32_runtime } */
> > +
> > +#define WIDTH 32
> > +#define EXT 0
> > +#include "floatn-basic.h"
> 
> This fails on powerpc32, in vafn.

That seems like the alpha issue - an ABI needs to be defined and 
implemented.  Unfortunately the powerabi mailing list, which would have 
been the right place for ABI coordination between implementors, died 
several years ago.  (The 32-bit ABI source code is available at 
<https://github.com/ryanarn/powerabi>.)

If we suppose that _Float32 values should be passed in FPRs in the same 
circumstances in which float values are passed in FPRs, then 
rs6000_gimplify_va_arg would, in the case of an SFmode value coming from 
saved FPRs, need to extract a double value from the saved FPRs and then 
convert to float.  (There would also be the question of later _Float32 
arguments passed on the stack in variable arguments; if those are handled 
like prototyped arguments, they would go in 4-byte stack slots, and 
probably the compiler already does that.)  Of course other ABI choices are 
possible.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]