public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [PATCH] Fix PR target/36399
@ 2010-03-13  9:32 Ozkan Sezer
  2010-03-13 17:31 ` Jack Howarth
  0 siblings, 1 reply; 3+ messages in thread
From: Ozkan Sezer @ 2010-03-13  9:32 UTC (permalink / raw)
  To: Jack Howarth; +Cc: gcc-patches, fxcoudert, mikestump

> --- gcc/testsuite/gcc.target/i386/push-1.c      (revision 157393)
> +++ gcc/testsuite/gcc.target/i386/push-1.c      (working copy)
> @@ -12,4 +12,4 @@
>    foo (x, x, x, x, 5);
>  }
>
> -/* { dg-final { scan-assembler-not "movups" { xfail *-*-* } } } */
> +/* { dg-final { scan-assembler-not "movups" { xfail *-*-![darwin]* } } } */

Tried the part about this testsuite change with gcc-4.4 and it
caused this new failure on i686-pc-linux-gnu:
FAIL: gcc.target/i386/push-1.c scan-assembler-not movups

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix PR target/36399
  2010-03-13  9:32 [PATCH] Fix PR target/36399 Ozkan Sezer
@ 2010-03-13 17:31 ` Jack Howarth
  0 siblings, 0 replies; 3+ messages in thread
From: Jack Howarth @ 2010-03-13 17:31 UTC (permalink / raw)
  To: Ozkan Sezer; +Cc: gcc-patches, fxcoudert, mikestump

On Sat, Mar 13, 2010 at 10:08:54AM +0200, Ozkan Sezer wrote:
> > --- gcc/testsuite/gcc.target/i386/push-1.c      (revision 157393)
> > +++ gcc/testsuite/gcc.target/i386/push-1.c      (working copy)
> > @@ -12,4 +12,4 @@
> >    foo (x, x, x, x, 5);
> >  }
> >
> > -/* { dg-final { scan-assembler-not "movups" { xfail *-*-* } } } */
> > +/* { dg-final { scan-assembler-not "movups" { xfail *-*-![darwin]* } } } */
> 
> Tried the part about this testsuite change with gcc-4.4 and it
> caused this new failure on i686-pc-linux-gnu:
> FAIL: gcc.target/i386/push-1.c scan-assembler-not movups

The following variation should work for you...

Index: gcc.target/i386/push-1.c
===================================================================
--- gcc.target/i386/push-1.c	(revision 157414)
+++ gcc.target/i386/push-1.c	(working copy)
@@ -12,4 +12,4 @@
   foo (x, x, x, x, 5);
 }
 
-/* { dg-final { scan-assembler-not "movups" { xfail *-*-* } } } */
+/* { dg-final { scan-assembler-not "movups" { xfail { ! *-*-darwin* } } } } */

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] Fix PR target/36399
@ 2010-03-12  9:44 Jack Howarth
  0 siblings, 0 replies; 3+ messages in thread
From: Jack Howarth @ 2010-03-12  9:44 UTC (permalink / raw)
  To: gcc-patches; +Cc: fxcoudert, mikestump

    The attached patch implements Apple's definition of
x86 32-bit ABI for X86_32_SSE_REGPARM_MAX. Bootstrapped
and regression tested on i686-apple-darwin10. Okay for
gcc trunk?
            Jack
ps With this patch, the original test code of...

#include <xmmintrin.h>
__m128i r(__m128 d1, __m128 d2, __m128 d3, __m128i r, int t, __m128i s) {return r+s;}

now shows the following diff in the generated assembly
without and with the patch applied...

--- test.s.prepatch	2010-03-11 20:05:14.000000000 -0500
+++ test.s	2010-03-11 20:06:04.000000000 -0500
@@ -3,12 +3,13 @@
 _r:
 	pushl	%ebp
 	movl	%esp, %ebp
-	subl	$56, %esp
+	subl	$72, %esp
 	movaps	%xmm0, -24(%ebp)
 	movaps	%xmm1, -40(%ebp)
 	movaps	%xmm2, -56(%ebp)
-	movdqa	40(%ebp), %xmm0
-	movdqa	8(%ebp), %xmm1
+	movdqa	%xmm3, -72(%ebp)
+	movdqa	24(%ebp), %xmm0
+	movdqa	-72(%ebp), %xmm1
 	paddq	%xmm1, %xmm0
 	leave
 	ret

which shows that we now produce the same code as Apple's
gcc compilers...

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36399#c3

This patch does produce one change in the gcc testsuite
results...

XPASS: gcc.target/i386/push-1.c scan-assembler-not movups

...hence the testsuite change modeled on libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc.

2010-03-11  Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
	    Jack Howarth <howarth@bromo.med.uc.edu>

	PR target/36399
	* gcc/config/i386/i386.h: Fix ABI on darwin x86-32.
	* gcc/testsuite/gcc.target/i386/push-1.c: Don't xfail
	  scan-assembler-not "movups" on darwin.


Index: gcc/config/i386/i386.h
===================================================================
--- gcc/config/i386/i386.h	(revision 157393)
+++ gcc/config/i386/i386.h	(working copy)
@@ -1810,7 +1810,7 @@
 #define X86_64_SSE_REGPARM_MAX 8
 #define X86_64_MS_SSE_REGPARM_MAX 4
 
-#define X86_32_SSE_REGPARM_MAX (TARGET_SSE ? 3 : 0)
+#define X86_32_SSE_REGPARM_MAX (TARGET_SSE ? (TARGET_MACHO ? 4 : 3) : 0)
 
 #define SSE_REGPARM_MAX							\
   (TARGET_64BIT ? (TARGET_64BIT_MS_ABI ? X86_64_MS_SSE_REGPARM_MAX	\
Index: gcc/testsuite/gcc.target/i386/push-1.c
===================================================================
--- gcc/testsuite/gcc.target/i386/push-1.c      (revision 157393)
+++ gcc/testsuite/gcc.target/i386/push-1.c      (working copy)
@@ -12,4 +12,4 @@
   foo (x, x, x, x, 5);
 }

-/* { dg-final { scan-assembler-not "movups" { xfail *-*-* } } } */
+/* { dg-final { scan-assembler-not "movups" { xfail *-*-![darwin]* } } } */

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-03-13 17:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-13  9:32 [PATCH] Fix PR target/36399 Ozkan Sezer
2010-03-13 17:31 ` Jack Howarth
  -- strict thread matches above, loose matches on Subject: below --
2010-03-12  9:44 Jack Howarth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).