This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH]: Fix PR target/29169


Hello!

Attached patch fixes FAIL, where scan-assembler-not "fisttp" is finding "fisttp" in file name. Fixed by renaming sse3-not-fisttp.c into sse-21.c. Also, for 64bit targets. we default to SSE math, so the test didn't test what it was supposed to test. This problem was fixed by introducing -mfpmath=i387 to dg-options.

2006-09-23 Uros Bizjak <uros@kss-loka.si>

       PR target/29169
       * gcc.target/i386/sse-21.c: Rename from sse3-not-fisttp.c.
       (dg-options): Add -mfpmath=387.

Patch was tested for x86_64-pc-linux-gnu by running testsuite.

OK for mainline?

Uros.
Index: sse-21.c
===================================================================
--- sse-21.c	(revision 117170)
+++ sse-21.c	(working copy)
@@ -1,6 +1,6 @@
 /* Test that we don't generate a fisttp instruction when -mno-sse3.  */
 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
-/* { dg-options "-O -march=nocona -mno-sse3" } */
+/* { dg-options "-O -mfpmath=387 -march=nocona -mno-sse3" } */
 /* { dg-final { scan-assembler-not "fisttp" } } */
 struct foo
 {
Index: sse3-not-fisttp.c
===================================================================
--- sse3-not-fisttp.c	(revision 117170)
+++ sse3-not-fisttp.c	(working copy)
@@ -1,24 +0,0 @@
-/* Test that we don't generate a fisttp instruction when -mno-sse3.  */
-/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
-/* { dg-options "-O -march=nocona -mno-sse3" } */
-/* { dg-final { scan-assembler-not "fisttp" } } */
-struct foo
-{
- long a;
- long b;
-};
-
-extern double c;
-
-extern unsigned long long baz (void);
-
-int
-walrus (const struct foo *input)
-{
-    unsigned long long d;
-
-    d = baz ()
-      + (unsigned long long) (((double) input->a * 1000000000
-			      + (double) input->b) * c);
-    return (d ? 1 : 0);
-}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]