On Mon, Jul 18, 2016 at 06:42:02PM -0500, Segher Boessenkool wrote:
> On Mon, Jul 18, 2016 at 07:25:09PM -0400, Michael Meissner wrote:
> > When I added the support for __float128 last year, I accidentally broke
> > returning structures containing a single float or double item using the
> > System
> > V 32-bit calling sequence.
> >
> > This patch goes back to using SCALAR_FLOAT_TYPE_P (which looks at the tree
> > node) instead of SCALAR_FLOAT_MODE_NOT_VECTOR_P (which only looks at the
> > mode).
> >
> > I have tested this patch on the trunk on a big endian power7 system, and
> > there
> > were no regressions. The same patch applies to the GCC-6 branch, and I am
> > testing it now. Assuming there are no regresions on the GCC-6 branch, can I
> > check this patch into both the trunk and gcc-6-branch?
>
> Did you test with -m32, too?
>
> Ah the testcases (thanks) have it explicitly. Well. Does this work?
>
> > +/* { dg-do compile { target { powerpc*-*-linux* && ilp32 } } } */
> > +/* { dg-options "-O2 -m32 -msvr4-struct-return" } */
Yes, both test out ok.
> Are dg-options set before the target test or after? If before, the ilp32
> is superfluous; if after, the -m32 is. Or is there more to it?
Not really, using ilp32 and explicit -m32 means -m32 is passed twice. I will
remove the explicit -m32.
> I think you can drop the ilp32.
You cannot use -m32 on a 64-bit little endian system, so the && ilp32 test
guarantees it is only run on a system that supports 32-bit (a pure 32-bit
system, or a big endian 64-bit system that still has the 32-bit libraries
installed).
I also imagine somebody could build a 64-bit big endian compiler that was
configured with --disable-multilib, and you would not be able to do -m32.
> Please sort that out, make sure the testcases are actually run, and then
> this is okay for trunk as well as 6.
As I said, I dropped the explicit -m32 in dg-options.
> Thanks for taking care of this!
--
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: [email protected], phone: +1 (978) 899-4797