From f6d03cd5618b1d3b96b242a520e58fc260e27c75 Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Sat, 16 Jul 2011 12:07:17 +0000 Subject: [PATCH] mul-subnormal-single-1.x: Add tic6x-*-* case. * gcc.c-torture/execute/ieee/mul-subnormal-single-1.x: Add tic6x-*-* case. * gcc.c-torture/execute/ieee/20000320-1.x: Likewise. * gcc.c-torture/execute/ieee/hugeval.x: Likewise. * gcc.c-torture/execute/ieee/mzero2.c: Comment out the divide tests for C67X. * gcc.c-torture/execute/ieee/pr29302.x: New file. * gcc.dg/torture/type-generic-1.c: Add -DUNSAFE for tic6x-*-*. * gcc.dg/torture/builtin-math-7.c: Add a comment. From-SVN: r176353 --- gcc/testsuite/ChangeLog | 12 ++++++++++++ .../gcc.c-torture/execute/ieee/20000320-1.x | 5 +++++ gcc/testsuite/gcc.c-torture/execute/ieee/hugeval.x | 6 ++++++ .../execute/ieee/mul-subnormal-single-1.x | 5 +++++ gcc/testsuite/gcc.c-torture/execute/ieee/mzero2.c | 3 +++ gcc/testsuite/gcc.c-torture/execute/ieee/pr29302-1.x | 12 ++++++++++++ gcc/testsuite/gcc.dg/torture/builtin-math-7.c | 1 + gcc/testsuite/gcc.dg/torture/type-generic-1.c | 1 + 8 files changed, 45 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/execute/ieee/pr29302-1.x diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c49833478f3..cdc2f2d5fbc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,15 @@ +2011-07-16 Bernd Schmidt + + * gcc.c-torture/execute/ieee/mul-subnormal-single-1.x: Add tic6x-*-* + case. + * gcc.c-torture/execute/ieee/20000320-1.x: Likewise. + * gcc.c-torture/execute/ieee/hugeval.x: Likewise. + * gcc.c-torture/execute/ieee/mzero2.c: Comment out the divide tests for + C67X. + * gcc.c-torture/execute/ieee/pr29302.x: New file. + * gcc.dg/torture/type-generic-1.c: Add -DUNSAFE for tic6x-*-*. + * gcc.dg/torture/builtin-math-7.c: Add a comment. + 2011-07-15 Jason Merrill PR testsuite/49741 diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/20000320-1.x b/gcc/testsuite/gcc.c-torture/execute/ieee/20000320-1.x index 4535c611eb4..e05e854846e 100644 --- a/gcc/testsuite/gcc.c-torture/execute/ieee/20000320-1.x +++ b/gcc/testsuite/gcc.c-torture/execute/ieee/20000320-1.x @@ -7,4 +7,9 @@ if [istarget "avr-*-*"] { # AVR doubles are floats return 1 } +if { [istarget "tic6x-*-*"] && [check_effective_target_ti_c67x] } { + # C6X floating point hardware turns denormals to zero in FP conversions. + set torture_execute_xfail "tic6x-*-*" + return 1 +} return 0 diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/hugeval.x b/gcc/testsuite/gcc.c-torture/execute/ieee/hugeval.x index ee4ac4feb96..c66de1c0648 100644 --- a/gcc/testsuite/gcc.c-torture/execute/ieee/hugeval.x +++ b/gcc/testsuite/gcc.c-torture/execute/ieee/hugeval.x @@ -19,5 +19,11 @@ if {[istarget "*-*-vxworks*"]} { } } +if { [istarget "tic6x-*-*"] && [check_effective_target_ti_c67x] } { + # C6X uses -freciprocal-math by default. + set torture_execute_xfail "$target_triplet" + return 1 +} + return 0 diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/mul-subnormal-single-1.x b/gcc/testsuite/gcc.c-torture/execute/ieee/mul-subnormal-single-1.x index 5978c94a8ea..418526599d5 100644 --- a/gcc/testsuite/gcc.c-torture/execute/ieee/mul-subnormal-single-1.x +++ b/gcc/testsuite/gcc.c-torture/execute/ieee/mul-subnormal-single-1.x @@ -13,4 +13,9 @@ if [istarget "spu-*-*"] { # support subnormals. return 1 } +if { [istarget "tic6x-*-*"] && [check_effective_target_ti_c67x] } { + # C6X floating point hardware turns denormals to zero in multiplications. + set torture_execute_xfail "tic6x-*-*" + return 1 +} return 0 diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/mzero2.c b/gcc/testsuite/gcc.c-torture/execute/ieee/mzero2.c index 0da53d24737..00c8efe9136 100644 --- a/gcc/testsuite/gcc.c-torture/execute/ieee/mzero2.c +++ b/gcc/testsuite/gcc.c-torture/execute/ieee/mzero2.c @@ -44,6 +44,8 @@ main () expect (+1.00 * nzero, nzero); expect (-1.00 * nzero, pzero); +#ifndef _TMS320C6700 + /* C6X floating point division is implemented using reciprocals. */ expect (pzero / pzero, nan); expect (pzero / nzero, nan); expect (nzero / pzero, nan); @@ -53,6 +55,7 @@ main () expect (-1.00 / pzero, ninf); expect (+1.00 / nzero, ninf); expect (-1.00 / nzero, pinf); +#endif exit (0); } diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/pr29302-1.x b/gcc/testsuite/gcc.c-torture/execute/ieee/pr29302-1.x new file mode 100644 index 00000000000..1922b14d83e --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/ieee/pr29302-1.x @@ -0,0 +1,12 @@ +if { [istarget "tic6x-*-*"] && [check_effective_target_ti_c67x] } { + # C6X uses -freciprocal-math by default. + set torture_execute_xfail "tic6x-*-*" + return 1 +} +return 0 +if { [istarget "tic6x-*-*"] && [check_effective_target_ti_c67x] } { + # C6X uses -freciprocal-math by default. + set torture_execute_xfail "tic6x-*-*" + return 1 +} +return 0 diff --git a/gcc/testsuite/gcc.dg/torture/builtin-math-7.c b/gcc/testsuite/gcc.dg/torture/builtin-math-7.c index 754d3f0b442..064e28641a7 100644 --- a/gcc/testsuite/gcc.dg/torture/builtin-math-7.c +++ b/gcc/testsuite/gcc.dg/torture/builtin-math-7.c @@ -5,6 +5,7 @@ Origin: Kaveh R. Ghazi, August 13, 2009. */ /* { dg-do run } */ +/* C6X fails due to -freciprocal-math default. */ /* { dg-skip-if "" { tic6x-*-* } "*" "" } */ /* { dg-add-options ieee } */ /* { dg-require-effective-target large_double } */ diff --git a/gcc/testsuite/gcc.dg/torture/type-generic-1.c b/gcc/testsuite/gcc.dg/torture/type-generic-1.c index add83c09815..f6949cff136 100644 --- a/gcc/testsuite/gcc.dg/torture/type-generic-1.c +++ b/gcc/testsuite/gcc.dg/torture/type-generic-1.c @@ -3,6 +3,7 @@ /* { dg-do run } */ /* { dg-skip-if "No Inf/NaN support" { spu-*-* } } */ +/* { dg-options "-DUNSAFE" { target tic6x*-*-* } } */ /* { dg-add-options ieee } */ #include "../tg-tests.h" -- 2.30.2