From 4bab2b2301d6fd898ab09a02f6f2cada3638cb18 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Thu, 26 Oct 2006 08:23:19 +0000 Subject: [PATCH] i386.exp: Use glob, not find to collect tests. 2006-10-26 Richard Guenther * gcc.target/i386/i386.exp: Use glob, not find to collect tests. Avoids recursing into subdirectories. * gcc.target/i386/math-torture/math-torture.exp: Torture for interesting ia32 math options. * gcc.target.i386/math-torture/lrint.c: New testcase. From-SVN: r118065 --- gcc/testsuite/ChangeLog | 8 +++++ gcc/testsuite/gcc.target/i386/i386.exp | 2 +- .../gcc.target/i386/math-torture/lrint.c | 26 ++++++++++++++++ .../i386/math-torture/math-torture.exp | 31 +++++++++++++++++++ 4 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.target/i386/math-torture/lrint.c create mode 100644 gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 30a614923f3..475ead71902 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2006-10-26 Richard Guenther + + * gcc.target/i386/i386.exp: Use glob, not find to collect + tests. Avoids recursing into subdirectories. + * gcc.target/i386/math-torture/math-torture.exp: Torture + for interesting ia32 math options. + * gcc.target.i386/math-torture/lrint.c: New testcase. + 2006-10-26 Jerry DeLisle PR libgfortran/29563 diff --git a/gcc/testsuite/gcc.target/i386/i386.exp b/gcc/testsuite/gcc.target/i386/i386.exp index 565a889a7f5..f6c6210d84d 100644 --- a/gcc/testsuite/gcc.target/i386/i386.exp +++ b/gcc/testsuite/gcc.target/i386/i386.exp @@ -44,7 +44,7 @@ foreach type { "" -mmmx -m3dnow -msse -msse2 } { } # Everything else. -set tests [lsort [find $srcdir/$subdir *.\[cS\]]] +set tests [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] set tests [prune $tests $srcdir/$subdir/vect-args.c] # Main loop. diff --git a/gcc/testsuite/gcc.target/i386/math-torture/lrint.c b/gcc/testsuite/gcc.target/i386/math-torture/lrint.c new file mode 100644 index 00000000000..73b75b7adbd --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/math-torture/lrint.c @@ -0,0 +1,26 @@ +/* { dg-do assemble } */ + +long testlf (float x) +{ + return __builtin_lrintf (x); +} +long testl (double x) +{ + return __builtin_lrint (x); +} +long testll (long double x) +{ + return __builtin_lrintl (x); +} +long long testllf (float x) +{ + return __builtin_llrintf (x); +} +long long testll_ (double x) +{ + return __builtin_llrint (x); +} +long long testlll (long double x) +{ + return __builtin_llrintl (x); +} diff --git a/gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp b/gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp new file mode 100644 index 00000000000..01f0778ca24 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp @@ -0,0 +1,31 @@ +# This harness is for tests that should be run at all optimisation levels. + +set TORTURE_OPTIONS [list \ + { -O0 } \ + { -O0 -mfpmath=387 } \ + { -O0 -msse -mno-sse2 -mfpmath=sse } \ + { -O0 -msse -msse2 -mfpmath=sse } \ + { -O0 -msse -mno-sse2 -mfpmath=sse,387 } \ + { -O0 -msse -msse2 -mfpmath=sse,387 } \ + { -O0 -mfpmath=387 -ffast-math } \ + { -O0 -msse -mno-sse2 -mfpmath=sse -ffast-math } \ + { -O0 -msse -msse2 -mfpmath=sse -ffast-math } \ + { -O0 -msse -mno-sse2 -mfpmath=sse,387 -ffast-math } \ + { -O0 -msse -msse2 -mfpmath=sse,387 -ffast-math } \ + { -O2 } \ + { -O2 -mfpmath=387 } \ + { -O2 -msse -mno-sse2 -mfpmath=sse } \ + { -O2 -msse -msse2 -mfpmath=sse } \ + { -O2 -msse -mno-sse2 -mfpmath=sse,387 } \ + { -O2 -msse -msse2 -mfpmath=sse,387 } \ + { -O2 -mfpmath=387 -ffast-math } \ + { -O2 -msse -mno-sse2 -mfpmath=sse -ffast-math } \ + { -O2 -msse -msse2 -mfpmath=sse -ffast-math } \ + { -O2 -msse -mno-sse2 -mfpmath=sse,387 -ffast-math } \ + { -O2 -msse -msse2 -mfpmath=sse,387 -ffast-math } \ +] +load_lib gcc-dg.exp + +dg-init +gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] "" +dg-finish