i386.exp: Use glob, not find to collect tests.
authorRichard Guenther <rguenther@suse.de>
Thu, 26 Oct 2006 08:23:19 +0000 (08:23 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 26 Oct 2006 08:23:19 +0000 (08:23 +0000)
2006-10-26  Richard Guenther  <rguenther@suse.de>

* 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
gcc/testsuite/gcc.target/i386/i386.exp
gcc/testsuite/gcc.target/i386/math-torture/lrint.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp [new file with mode: 0644]

index 30a6149..475ead7 100644 (file)
@@ -1,3 +1,11 @@
+2006-10-26  Richard Guenther  <rguenther@suse.de>
+
+       * 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  <jvdelisle@gcc.gnu.org>
 
        PR libgfortran/29563
index 565a889..f6c6210 100644 (file)
@@ -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 (file)
index 0000000..73b75b7
--- /dev/null
@@ -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 (file)
index 0000000..01f0778
--- /dev/null
@@ -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