This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Implement C _FloatN, _FloatNx types [version 6]
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: <gcc-patches at gcc dot gnu dot org>, <dje dot gcc at gmail dot com>, <segher at kernel dot crashing dot org>, <meissner at linux dot vnet dot ibm dot com>, <murphyp at linux dot vnet dot ibm dot com>
- Date: Mon, 5 Sep 2016 11:40:53 +0000
- Subject: Re: Implement C _FloatN, _FloatNx types [version 6]
- Authentication-results: sourceware.org; auth=none
- References: <alpine.DEB.2.20.1606211202040.4526@digraph.polyomino.org.uk> <alpine.DEB.2.20.1606211738200.31330@digraph.polyomino.org.uk> <alpine.DEB.2.20.1606231418120.21240@digraph.polyomino.org.uk> <alpine.DEB.2.20.1606271720270.7438@digraph.polyomino.org.uk> <alpine.DEB.2.20.1607191347340.9265@digraph.polyomino.org.uk> <alpine.DEB.2.20.1607222158330.22448@digraph.polyomino.org.uk> <20160817154244.GA39270@arm.com> <alpine.DEB.2.20.1608171641000.7156@digraph.polyomino.org.uk> <alpine.DEB.2.20.1608172015080.27199@digraph.polyomino.org.uk> <871t11x7rd.fsf@linux-m68k.org>
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