From: Bill Schmidt Date: Fri, 1 Jul 2016 20:38:51 +0000 (+0000) Subject: const-float128-ped.c: Require __float128 effective target and options. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e2298656eb195614bcf70e385ddf44a4b137a081;p=gcc.git const-float128-ped.c: Require __float128 effective target and options. 2016-07-01 Bill Schmidt * 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. From-SVN: r237924 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a1255a0763f..11af4b3b730 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,22 @@ +2016-07-01 Bill Schmidt + + * 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 PR target/71720 diff --git a/gcc/testsuite/gcc.dg/const-float128-ped.c b/gcc/testsuite/gcc.dg/const-float128-ped.c index 6a6b6223ce2..c1869cc43f3 100644 --- a/gcc/testsuite/gcc.dg/const-float128-ped.c +++ b/gcc/testsuite/gcc.dg/const-float128-ped.c @@ -1,5 +1,7 @@ /* 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" } */ diff --git a/gcc/testsuite/gcc.dg/const-float128.c b/gcc/testsuite/gcc.dg/const-float128.c index 116e4597b44..15394b483fc 100644 --- a/gcc/testsuite/gcc.dg/const-float128.c +++ b/gcc/testsuite/gcc.dg/const-float128.c @@ -1,6 +1,8 @@ /* 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; diff --git a/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c b/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c index 19998f48251..1f675efdd61 100644 --- a/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c +++ b/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c @@ -1,7 +1,10 @@ /* 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 #include diff --git a/gcc/testsuite/gcc.dg/torture/float128-div-underflow.c b/gcc/testsuite/gcc.dg/torture/float128-div-underflow.c index f721e562b8a..dc284dec6dc 100644 --- a/gcc/testsuite/gcc.dg/torture/float128-div-underflow.c +++ b/gcc/testsuite/gcc.dg/torture/float128-div-underflow.c @@ -1,7 +1,10 @@ /* 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 #include diff --git a/gcc/testsuite/gcc.dg/torture/float128-extend-nan.c b/gcc/testsuite/gcc.dg/torture/float128-extend-nan.c index 60f9bbe9435..65dc520af7f 100644 --- a/gcc/testsuite/gcc.dg/torture/float128-extend-nan.c +++ b/gcc/testsuite/gcc.dg/torture/float128-extend-nan.c @@ -1,7 +1,10 @@ /* 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 #include diff --git a/gcc/testsuite/gcc.dg/torture/float128-nan.c b/gcc/testsuite/gcc.dg/torture/float128-nan.c index 6e0d4744a45..0ad043160a4 100644 --- a/gcc/testsuite/gcc.dg/torture/float128-nan.c +++ b/gcc/testsuite/gcc.dg/torture/float128-nan.c @@ -1,7 +1,10 @@ /* 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 #include diff --git a/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-2.c b/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-2.c index 9990e190c60..b46acb39fd5 100644 --- a/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-2.c +++ b/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-2.c @@ -1,9 +1,12 @@ /* Test floating-point conversions. __float128 type with TImode: bug 53317. */ /* Origin: Joseph Myers */ -/* { 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); diff --git a/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c b/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c index 944494d9bcc..fa6eb6b72bf 100644 --- a/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c +++ b/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c @@ -1,8 +1,11 @@ /* 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 #include diff --git a/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode.c b/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode.c index 8318f8ad8ae..493dee892b0 100644 --- a/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode.c +++ b/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode.c @@ -1,7 +1,10 @@ /* Test floating-point conversions. __float128 type with TImode. */ /* Origin: Joseph Myers */ -/* { 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" diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 05ad5c1775c..4ef52ace37b 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -2370,6 +2370,40 @@ proc check_effective_target_has_q_floating_suffix { } { 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.