+2016-07-01 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * gcc.dg/const-float128-ped.c: Require __float128 effective
+ target and options.
+ * gcc.dg/const-float128.c: Likewise.
+ * gcc.dg/torture/float128-cmp-invalid.c: Require
+ __float128 and base_quadfloat_support effective targets, and
+ __float128 options.
+ * gcc.dg/torture/float128-div-underflow.c: Likewise.
+ * gcc.dg/torture/float128-extend-nan.c: Likewise.
+ * 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.
+ * lib/target-supports.exp (check_effective_target___float128):
+ New.
+ (add_options_for___float128): New.
+ (check_effective_target_base_quadword_support): New.
+
2016-07-01 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/71720
/* Test 'q' suffix with -pedantic on __float128 type constants. */
-/* { dg-do compile { target ia64-*-* i?86-*-* x86_64-*-* } } */
+/* { dg-do compile } */
+/* { dg-require-effective-target __float128 } */
/* { dg-options "-pedantic" } */
+/* { dg-add-options __float128 } */
__float128 a = 123.456789q; /* { dg-warning "non-standard suffix on floating constant" } */
/* Test 'q' and 'Q' suffixes on __float128 type constants. */
-/* { dg-do compile { target ia64-*-* i?86-*-* x86_64-*-* } } */
+/* { dg-do compile } */
+/* { dg-require-effective-target __float128 } */
/* { dg-options "" } */
+/* { dg-add-options __float128 } */
__float128 a = 123.456789q;
__float128 b = 123.456789Q;
/* Test for "invalid" exceptions from __float128 comparisons. */
-/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-do run } */
/* { dg-options "" } */
+/* { dg-require-effective-target __float128 } */
+/* { dg-require-effective-target base_quadfloat_support } */
/* { dg-require-effective-target fenv_exceptions } */
+/* { dg-add-options __float128 } */
#include <fenv.h>
#include <stdlib.h>
/* Test for spurious underflow from __float128 division. */
-/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-do run } */
/* { dg-options "" } */
+/* { dg-require-effective-target __float128 } */
+/* { dg-require-effective-target base_quadfloat_support } */
/* { dg-require-effective-target fenv_exceptions } */
+/* { dg-add-options __float128 } */
#include <fenv.h>
#include <stdlib.h>
/* Test extensions to __float128 quiet signaling NaNs. */
-/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-do run } */
/* { dg-options "-fsignaling-nans" } */
+/* { dg-require-effective-target __float128 } */
+/* { dg-require-effective-target base_quadfloat_support } */
/* { dg-require-effective-target fenv_exceptions } */
+/* { dg-add-options __float128 } */
#include <fenv.h>
#include <float.h>
/* Test __float128 NaN generation. */
-/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-do run } */
/* { dg-require-effective-target fenv_exceptions } */
+/* { dg-require-effective-target __float128 } */
+/* { dg-require-effective-target base_quadfloat_support } */
/* { dg-options "" } */
+/* { dg-add-options __float128 } */
#include <fenv.h>
#include <stdbool.h>
/* Test floating-point conversions. __float128 type with TImode: bug
53317. */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
-/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-do run } */
+/* { dg-require-effective-target __float128 } */
+/* { dg-require-effective-target base_quadfloat_support } */
/* { dg-require-effective-target int128 } */
/* { dg-options "" } */
+/* { dg-add-options __float128 } */
extern void abort (void);
extern void exit (int);
/* Test for correct rounding of conversions from __int128 to
__float128. */
-/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-do run } */
+/* { dg-require-effective-target __float128 } */
+/* { dg-require-effective-target base_quadfloat_support } */
/* { dg-require-effective-target int128 } */
/* { dg-options "-frounding-math" } */
+/* { dg-add-options __float128 } */
#include <fenv.h>
#include <stdlib.h>
/* Test floating-point conversions. __float128 type with TImode. */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
-/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-do run } */
+/* { dg-require-effective-target __float128 } */
+/* { dg-require-effective-target base_quadfloat_support } */
/* { dg-options "" } */
+/* { dg-add-options __float128 } */
#include "fp-int-convert.h"
float dummy = 1.0q;
} "$opts"]
}
+
+# Return 1 if the target supports __float128,
+# 0 otherwise.
+
+proc check_effective_target___float128 { } {
+ if { [istarget powerpc*-*-*] } {
+ return [check_ppc_float128_sw_available]
+ }
+ if { [istarget ia64-*-*]
+ || [istarget i?86-*-*]
+ || [istarget x86_64-*-*] } {
+ return 1
+ }
+ return 0
+}
+
+proc add_options_for___float128 { flags } {
+ if { [istarget powerpc*-*-*] } {
+ return "$flags -mfloat128 -mvsx"
+ }
+ return "$flags"
+}
+
+# Return 1 if the target supports any special run-time requirements
+# for __float128 or _Float128,
+# 0 otherwise.
+
+proc check_effective_target_base_quadfloat_support { } {
+ if { [istarget powerpc*-*-*] } {
+ return [check_vsx_hw_available]
+ }
+ return 1
+}
+
# Return 1 if the target supports compiling fixed-point,
# 0 otherwise.