This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rs6000] Enable some existing __float128 tests for powerpc64*
- From: Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, segher at kernel dot crashing dot org, dje dot gcc at gmail dot com
- Date: Thu, 30 Jun 2016 10:06:12 -0500
- Subject: Re: [PATCH, rs6000] Enable some existing __float128 tests for powerpc64*
- Authentication-results: sourceware.org; auth=none
- References: <50a1d80a-98e3-d95b-17f0-01448c38167b at linux dot vnet dot ibm dot com> <alpine dot DEB dot 2 dot 20 dot 1606291632270 dot 22371 at digraph dot polyomino dot org dot uk>
On Wed, 2016-06-29 at 16:37 +0000, Joseph Myers wrote:
> On Tue, 28 Jun 2016, Bill Schmidt wrote:
>
> > -/* { dg-do compile { target ia64-*-* i?86-*-* x86_64-*-* } } */
> > +/* { dg-do compile { target ia64-*-* i?86-*-* x86_64-*-* powerpc64*-*-* } } */
> > /* { dg-options "-pedantic" } */
> > +/* { dg-additional-options "-mfloat128 -mvsx" { target powerpc64*-*-* } } */
>
> Rather than duplicating powerpc64 references everywhere, wouldn't it be
> better to add an effective-target keyword __float128, meaning that
> __float128 is available? Along with { dg-add-options float128 }.
Sure, I can do that. I guess I need to stay away from the name
check_effective_target_float128, though, as in your pending patch that
will mean availability of _Float128. Do you have a naming preference?
>
> Also: powerpc-* targets with -m64 should always be handled in tests
> identically to powerpc64 targets, while powerpc64 targets with -m32 should
> presumably not run these tests. That is, testing for powerpc64*-*-* is
> actually (always, for any test, not just these ones) incorrect in both
> directions (just as it's always incorrect for a test to list just one of
> i?86-*-* and x86_64-*-*, rather than listing both and then adding any
> restrictions required to 32-bit or 64-bit).
>
> > -/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
> > +/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* powerpc64*-*-* } } */
> > /* { dg-options "" } */
> > /* { dg-require-effective-target fenv_exceptions } */
> > +/* { dg-additional-options "-mfloat128 -mvsx" { target powerpc64*-*-* } } */
>
> Also: for execution tests, if you add extra options, you also need to
> restrict the test to running when the hardware actually supports the
> required features.
>
All good points, will fix in next revision.
Thanks!
Bill