Hi,

As Uros pointed out, there are a number of existing tests for __float128 in
gcc.dg and gcc.dg/torture.  This patch enables an appropriate subset of those
tests for 64-bit PowerPC, BE and LE.  A few of the tests aren't appropriate
for our architecture, as Joseph stated.  Still, this gives us some additional
coverage (10 more tests).

Tested on powerpc64[le]-unknown-linux-gnu.  Is this ok for trunk, and eventual
backport to gcc-6-branch?

Thanks,
Bill


2016-06-29  Bill Schmidt  <wschm...@linux.vnet.ibm.com>

        * gcc.dg/const-float128-ped.c: Enable for powerpc64*-*-*.
        * gcc.dg/const-float128.c: Likewise.
        * gcc.dg/torture/float128-cmp-invalid.c: Likewise.
        * gcc.dg/torture/float128-div-underflow.c: Likewise.
        * gcc.dg/torture/float128-exact-underflow.c: Enable for
        powerpc64*-*-*gnu*.
        * gcc.dg/torture/float128-extend-nan.c: Enable for
        powerpc64*-*-*.
        * gcc.dg/torture/float128-nan.c: Likewise.
        * gcc.dg/torture/fp-int-convert-float128-timode-2.c: Likewise.
        * gcc.dg/torture/fp-int-convert-float128-timode-3.c: Likewise.
        * gcc.dg/torture/fp-int-convert-float128-timode.c: Likewise.


Index: gcc/testsuite/gcc.dg/const-float128-ped.c
===================================================================
--- gcc/testsuite/gcc.dg/const-float128-ped.c   (revision 237802)
+++ gcc/testsuite/gcc.dg/const-float128-ped.c   (working copy)
@@ -1,5 +1,6 @@
 /* Test 'q' suffix with -pedantic on __float128 type constants.  */
-/* { 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*-*-* } } */
 
 __float128 a = 123.456789q; /* { dg-warning "non-standard suffix on floating 
constant" } */
Index: gcc/testsuite/gcc.dg/const-float128.c
===================================================================
--- gcc/testsuite/gcc.dg/const-float128.c       (revision 237802)
+++ gcc/testsuite/gcc.dg/const-float128.c       (working copy)
@@ -1,6 +1,7 @@
 /* Test 'q' and 'Q' suffixes on __float128 type constants.  */
-/* { dg-do compile { target ia64-*-* i?86-*-* x86_64-*-* } } */
+/* { dg-do compile { target ia64-*-* i?86-*-* x86_64-*-* powerpc64*-*-* } } */
 /* { dg-options "" } */
+/* { dg-additional-options "-mfloat128 -mvsx" { target powerpc64*-*-* } } */
 
 __float128 a = 123.456789q;
 __float128 b = 123.456789Q;
Index: gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c (revision 237802)
+++ gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c (working copy)
@@ -1,7 +1,8 @@
 /* Test for "invalid" exceptions from __float128 comparisons.  */
-/* { 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*-*-* } } */
 
 #include <fenv.h>
 #include <stdlib.h>
Index: gcc/testsuite/gcc.dg/torture/float128-div-underflow.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/float128-div-underflow.c       (revision 
237802)
+++ gcc/testsuite/gcc.dg/torture/float128-div-underflow.c       (working copy)
@@ -1,7 +1,8 @@
 /* Test for spurious underflow from __float128 division.  */
-/* { 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*-*-* } } */
 
 #include <fenv.h>
 #include <stdlib.h>
Index: gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c     (revision 
237802)
+++ gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c     (working copy)
@@ -2,9 +2,10 @@
    exception if trapping is enabled, but does not raise the flag
    otherwise.  */
 
-/* { dg-do run { target i?86-*-*gnu* x86_64-*-*gnu* ia64-*-*gnu* } } */
+/* { dg-do run { target i?86-*-*gnu* x86_64-*-*gnu* ia64-*-*gnu* 
powerpc64*-*-*gnu* } } */
 /* { dg-options "-D_GNU_SOURCE" } */
 /* { dg-require-effective-target fenv_exceptions } */
+/* { dg-additional-options "-mfloat128 -mvsx" { target powerpc64*-*-* } } */
 
 #include <fenv.h>
 #include <setjmp.h>
Index: gcc/testsuite/gcc.dg/torture/float128-extend-nan.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/float128-extend-nan.c  (revision 237802)
+++ gcc/testsuite/gcc.dg/torture/float128-extend-nan.c  (working copy)
@@ -1,7 +1,8 @@
 /* Test extensions to __float128 quiet signaling NaNs.  */
-/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* powerpc64*-*-* } } */
 /* { dg-options "-fsignaling-nans" } */
 /* { dg-require-effective-target fenv_exceptions } */
+/* { dg-additional-options "-mfloat128 -mvsx" { target powerpc64*-*-* } } */
 
 #include <fenv.h>
 #include <float.h>
Index: gcc/testsuite/gcc.dg/torture/float128-nan.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/float128-nan.c (revision 237802)
+++ gcc/testsuite/gcc.dg/torture/float128-nan.c (working copy)
@@ -1,7 +1,8 @@
 /* Test __float128 NaN generation.  */
-/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* powerpc64*-*-* } } */
 /* { dg-require-effective-target fenv_exceptions } */
 /* { dg-options "" } */
+/* { dg-additional-options "-mfloat128 -mvsx" { target powerpc64*-*-* } } */
 
 #include <fenv.h>
 #include <stdbool.h>
Index: gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-2.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-2.c     
(revision 237802)
+++ gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-2.c     
(working copy)
@@ -1,9 +1,10 @@
 /* Test floating-point conversions.  __float128 type with TImode: bug
    53317.  */
 /* Origin: Joseph Myers <jos...@codesourcery.com> */
-/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* powerpc64*-*-* } } */
 /* { dg-require-effective-target int128 } */
 /* { dg-options "" } */
+/* { dg-additional-options "-mfloat128 -mvsx" { target powerpc64*-*-* } } */
 
 extern void abort (void);
 extern void exit (int);
Index: gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c     
(revision 237802)
+++ gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c     
(working copy)
@@ -1,8 +1,9 @@
 /* Test for correct rounding of conversions from __int128 to
    __float128.  */
-/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* powerpc64*-*-* } } */
 /* { dg-require-effective-target int128 } */
 /* { dg-options "-frounding-math" } */
+/* { dg-additional-options "-mfloat128 -mvsx" { target powerpc64*-*-* } } */
 
 #include <fenv.h>
 #include <stdlib.h>
Index: gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode.c       
(revision 237802)
+++ gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode.c       
(working copy)
@@ -1,7 +1,8 @@
 /* Test floating-point conversions.  __float128 type with TImode.  */
 /* Origin: Joseph Myers <jos...@codesourcery.com> */
-/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* powerpc64*-*-* } } */
 /* { dg-options "" } */
+/* { dg-additional-options "-mfloat128 -mvsx" { target powerpc64*-*-* } } */
 
 #include "fp-int-convert.h"
 

Reply via email to