diff mbox

[testsuite] : Add -mfancy-math-387 to i387 testcases

Message ID AANLkTim8C8hHtg+aaDJ7XQJoMcGP4WxWXG5=e7K0LfVV@mail.gmail.com
State New
Headers show

Commit Message

Uros Bizjak Nov. 6, 2010, 11:07 a.m. UTC
Hello!

2010-11-06  Uros Bizjak  <ubizjak@gmail.com>

	* gcc.target/i386/387-2.c: Skip if -march= is specified.
	* gcc.target/i386/387-6.c: Ditto.
	* gcc.target/i386/387-2.c: Add -mfancy-math-387 to dg-options.
	* gcc.target/i386/387-4.c: Ditto.
	* gcc.target/i386/387-7.c: Ditto.
	* gcc.target/i386/387-8.c: Ditto.
	* gcc.target/i386/387-9.c: Ditto.
	* gcc.target/i386/387-10.c: Ditto.
	* gcc.target/i386/387-11.c: Ditto.
	* gcc.target/i386/387-12.c: Ditto.

	* gcc.target/i386/387-2.c: Add -mno-sse3 to dg-options.

Tested on x86_64-pc-linux-gnu {,-m32}, committed to mainline SVN.

Uros.
diff mbox

Patch

Index: 387-2.c
===================================================================
--- 387-2.c	(revision 166396)
+++ 387-2.c	(working copy)
@@ -1,6 +1,7 @@ 
 /* Verify that -march overrides -mno-fancy-math-387.  */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=i686" } } */
 /* { dg-options "-O -ffast-math -mfpmath=387 -march=i686 -mno-fancy-math-387" } */
 /* { dg-final { scan-assembler "fsin" } } */
 /* { dg-final { scan-assembler "fcos" } } */
Index: 387-11.c
===================================================================
--- 387-11.c	(revision 166396)
+++ 387-11.c	(working copy)
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2 -mfpmath=387" } */
+/* { dg-options "-O2 -mfpmath=387 -mfancy-math-387" } */
 
 double foo(double x, double y)
 {
Index: 387-4.c
===================================================================
--- 387-4.c	(revision 166396)
+++ 387-4.c	(working copy)
@@ -1,6 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-require-effective-target ilp32 } */
-/* { dg-options "-O2 -march=i686" } */
+/* { dg-options "-O2 -mfancy-math-387" } */
 /* { dg-final { scan-assembler "fldpi" } } */
 
 long double atanl (long double);
Index: 387-6.c
===================================================================
--- 387-6.c	(revision 166396)
+++ 387-6.c	(working copy)
@@ -1,6 +1,7 @@ 
 /* Verify that -march overrides -mno-fancy-math-387.  */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=i686" } } */
 /* { dg-options "-O -ffast-math -mfpmath=387 -march=i686 -mno-fancy-math-387" } */
 /* { dg-final { scan-assembler "fpatan" } } */
 /* { dg-final { scan-assembler "fyl2xp1" } } */
Index: 387-8.c
===================================================================
--- 387-8.c	(revision 166396)
+++ 387-8.c	(working copy)
@@ -2,8 +2,7 @@ 
    inherent load of 1.0 is used in further calculations.  */
 
 /* { dg-do compile } */
-/* { dg-require-effective-target ilp32 } */
-/* { dg-options "-O2 -ffast-math -march=i686" } */
+/* { dg-options "-O2 -ffast-math -mfpmath=387 -mfancy-math-387" } */
 /* { dg-final { scan-assembler "fptan" } } */
 /* { dg-final { scan-assembler-not "fld1" } } */
 
Index: funcspec-8.c
===================================================================
--- funcspec-8.c	(revision 166396)
+++ funcspec-8.c	(working copy)
@@ -2,7 +2,7 @@ 
    functions in functions with the appropriate function specific options.  */
 /* { dg-do compile } */
 /* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
-/* { dg-options "-O2 -march=k8 -mfpmath=sse" } */
+/* { dg-options "-O2 -march=k8 -mno-sse3 -mfpmath=sse" } */
 
 typedef float     __m128  __attribute__ ((__vector_size__ (16), __may_alias__));
 typedef double    __m128d __attribute__ ((__vector_size__ (16), __may_alias__));
Index: 387-10.c
===================================================================
--- 387-10.c	(revision 166396)
+++ 387-10.c	(working copy)
@@ -1,6 +1,6 @@ 
 /* PR tree-optimization/24964 */
 /* { dg-do compile } */
-/* { dg-options "-O2 -mfpmath=387" } */
+/* { dg-options "-O2 -mfpmath=387 -mfancy-math-387" } */
 
 double fabs(double x);
 
Index: 387-3.c
===================================================================
--- 387-3.c	(revision 166396)
+++ 387-3.c	(working copy)
@@ -1,7 +1,6 @@ 
 /* Verify that 387 mathematical constants are recognized.  */
 /* { dg-do compile } */
-/* { dg-require-effective-target ilp32 } */
-/* { dg-options "-O2 -march=i686" } */
+/* { dg-options "-O2 -mfpmath=387 -mfancy-math-387" } */
 /* { dg-final { scan-assembler "fldpi" } } */
 
 long double add_pi(long double x)
Index: 387-12.c
===================================================================
--- 387-12.c	(revision 166396)
+++ 387-12.c	(working copy)
@@ -1,7 +1,6 @@ 
 /* PR target/26915 */
 /* { dg-do compile } */
-/* { dg-require-effective-target ilp32 } */
-/* { dg-options "-O" } */
+/* { dg-options "-O -mfpmath=387 -mfancy-math-387" } */
 
 double testm0(void)
 {
Index: 387-7.c
===================================================================
--- 387-7.c	(revision 166396)
+++ 387-7.c	(working copy)
@@ -1,7 +1,6 @@ 
 /* Verify that 387 fsincos instruction is generated.  */
 /* { dg-do compile } */
-/* { dg-require-effective-target ilp32 } */
-/* { dg-options "-O -ffast-math -march=i686" } */
+/* { dg-options "-O -ffast-math -mfpmath=387 -mfancy-math-387" } */
 /* { dg-final { scan-assembler "fsincos" } } */
 
 extern double sin (double);
Index: 387-9.c
===================================================================
--- 387-9.c	(revision 166396)
+++ 387-9.c	(working copy)
@@ -1,7 +1,6 @@ 
 /* Verify that 387 fsincos instruction is generated.  */
 /* { dg-do compile } */
-/* { dg-require-effective-target ilp32 } */
-/* { dg-options "-O -funsafe-math-optimizations -march=i686" } */
+/* { dg-options "-O -funsafe-math-optimizations -mfpmath=387 -mfancy-math-387" } */
 
 extern double sin (double);
 extern double cos (double);