testsuite - Some float64 and float32x test require double64plus.
Some of the float64 and float32x test cases are using double built-ins
and hence require double64plus resp. that double is at least as good
as float32x (double_float32xplus).
gcc/testsuite/
* lib/target-supports.exp (check_effective_target_double_float32xplus):
New proc.
* gcc.dg/torture/float32x-builtin.c: Add
dg-require-effective-target double_float32xplus.
* gcc.dg/torture/float32x-tg-2.c: Same.
* gcc.dg/torture/float32x-tg.c: Same.
* gcc.dg/torture/float64-builtin.c: Add
dg-require-effective-target double64plus.
* gcc.dg/torture/float64-tg-2.c: Same.
* gcc.dg/torture/float64-tg.c: Same.
@@ -4,6 +4,7 @@
/* { dg-add-options float32x } */
/* { dg-add-options ieee } */
/* { dg-require-effective-target float32x_runtime } */
+/* { dg-require-effective-target double_float32xplus } */
#define WIDTH 32
#define EXT 1
@@ -4,6 +4,7 @@
/* { dg-add-options float32x } */
/* { dg-add-options ieee } */
/* { dg-require-effective-target float32x_runtime } */
+/* { dg-require-effective-target double_float32xplus } */
#define WIDTH 32
#define EXT 1
@@ -4,6 +4,7 @@
/* { dg-add-options float32x } */
/* { dg-add-options ieee } */
/* { dg-require-effective-target float32x_runtime } */
+/* { dg-require-effective-target double_float32xplus } */
#define WIDTH 32
#define EXT 1
@@ -4,6 +4,7 @@
/* { dg-add-options float64 } */
/* { dg-add-options ieee } */
/* { dg-require-effective-target float64_runtime } */
+/* { dg-require-effective-target double64plus } */
#define WIDTH 64
#define EXT 0
@@ -4,6 +4,7 @@
/* { dg-add-options float64 } */
/* { dg-add-options ieee } */
/* { dg-require-effective-target float64_runtime } */
+/* { dg-require-effective-target double64plus } */
#define WIDTH 64
#define EXT 0
@@ -4,6 +4,7 @@
/* { dg-add-options float64 } */
/* { dg-add-options ieee } */
/* { dg-require-effective-target float64_runtime } */
+/* { dg-require-effective-target double64plus } */
#define WIDTH 64
#define EXT 0
@@ -3965,6 +3965,17 @@ proc check_effective_target_floatn_nx_runtime {} {
return 1
}
+# Return 1 when double is at least as good as _Float32x, i.e. double can
+# be used to emulate _Float32x.
+
+proc check_effective_target_double_float32xplus {} {
+ return [check_no_compiler_messages_nocache double_float32xplus object {
+ _Float32x x;
+ int dummy1[__DBL_MANT_DIG__ >= __FLT32X_MANT_DIG__ ? 1 : -1];
+ int dummy2[__DBL_MAX_EXP__ >= __FLT32X_MAX_EXP__ ? 1 : -1];
+ } [add_options_for_float32x ""]]
+}
+
# Add options needed to use the _FloatN / _FloatNx type indicated in
# the function name.