public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/36399] New: FSF GCC ABI bug on darwin/x86-32
@ 2008-05-31 9:03 sabre at nondot dot org
2008-05-31 10:59 ` [Bug target/36399] " rguenth at gcc dot gnu dot org
` (14 more replies)
0 siblings, 15 replies; 16+ messages in thread
From: sabre at nondot dot org @ 2008-05-31 9:03 UTC (permalink / raw)
To: gcc-bugs
This testcase:
#include <xmmintrin.h>
__m128i r(__m128 d1, __m128 d2, __m128 d3, __m128i r, int t, __m128i s) {return
r+s;}
compiles to:
_r:
subl $12, %esp
movdqa %xmm3, %xmm0
paddq 32(%esp), %xmm0
addl $12, %esp
ret
with apple gcc 4.0 and 4.2.
It compiles to this with FSF 4.2:
_r:
subl $12, %esp
movdqa 48(%esp), %xmm0
paddq 16(%esp), %xmm0
addl $12, %esp
ret
Since apple GCC defines the ABI on darwin, this is an FSF GCC ABI bug for that
platform.
--
Summary: FSF GCC ABI bug on darwin/x86-32
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sabre at nondot dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36399
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/36399] FSF GCC ABI bug on darwin/x86-32
2008-05-31 9:03 [Bug c/36399] New: FSF GCC ABI bug on darwin/x86-32 sabre at nondot dot org
@ 2008-05-31 10:59 ` rguenth at gcc dot gnu dot org
2008-06-03 0:38 ` echristo at apple dot com
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-05-31 10:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2008-05-31 10:58 -------
As apple implements the darwin ABI in the FSF gcc it's apples turn to fix it.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c |target
GCC target triplet| |i?86-apple-darwin
Keywords| |ABI, wrong-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36399
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/36399] FSF GCC ABI bug on darwin/x86-32
2008-05-31 9:03 [Bug c/36399] New: FSF GCC ABI bug on darwin/x86-32 sabre at nondot dot org
2008-05-31 10:59 ` [Bug target/36399] " rguenth at gcc dot gnu dot org
@ 2008-06-03 0:38 ` echristo at apple dot com
2009-06-03 21:18 ` fxcoudert at gcc dot gnu dot org
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: echristo at apple dot com @ 2008-06-03 0:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from echristo at apple dot com 2008-06-03 00:37 -------
Confirmed.
--
echristo at apple dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-06-03 00:37:51
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36399
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/36399] FSF GCC ABI bug on darwin/x86-32
2008-05-31 9:03 [Bug c/36399] New: FSF GCC ABI bug on darwin/x86-32 sabre at nondot dot org
2008-05-31 10:59 ` [Bug target/36399] " rguenth at gcc dot gnu dot org
2008-06-03 0:38 ` echristo at apple dot com
@ 2009-06-03 21:18 ` fxcoudert at gcc dot gnu dot org
2009-06-04 0:06 ` dalej at gcc dot gnu dot org
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2009-06-03 21:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from fxcoudert at gcc dot gnu dot org 2009-06-03 21:18 -------
Here's what it gives with Apple's gcc:
_r:
pushl %ebp
movl %esp, %ebp
subl $72, %esp
movaps %xmm0, -24(%ebp)
movaps %xmm1, -40(%ebp)
movaps %xmm2, -56(%ebp)
movdqa %xmm3, -72(%ebp)
movdqa 24(%ebp), %xmm0
paddq -72(%ebp), %xmm0
leave
ret
and with FSF's gcc, both 4.3.2 and and 4.4.0 give:
_r:
pushl %ebp
movl %esp, %ebp
subl $56, %esp
movaps %xmm0, -24(%ebp)
movaps %xmm1, -40(%ebp)
movaps %xmm2, -56(%ebp)
movdqa 40(%ebp), %xmm1
movdqa 8(%ebp), %xmm0
paddq %xmm1, %xmm0
leave
ret
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.2.0 4.3.2 4.4.0 4.5.0
Last reconfirmed|2008-06-03 00:37:51 |2009-06-03 21:18:11
date| |
Version|unknown |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36399
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/36399] FSF GCC ABI bug on darwin/x86-32
2008-05-31 9:03 [Bug c/36399] New: FSF GCC ABI bug on darwin/x86-32 sabre at nondot dot org
` (2 preceding siblings ...)
2009-06-03 21:18 ` fxcoudert at gcc dot gnu dot org
@ 2009-06-04 0:06 ` dalej at gcc dot gnu dot org
2009-06-07 14:27 ` hjl dot tools at gmail dot com
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: dalej at gcc dot gnu dot org @ 2009-06-04 0:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from dalej at gcc dot gnu dot org 2009-06-04 00:06 -------
Yeah. Looking through our local changes, I think you just need this line in
i386.h:
#define SSE_REGPARM_MAX (TARGET_64BIT ? 8 : (TARGET_MACHO ? 4 : (TARGET_SSE ? 3
: 0)))
However Apple employees can't currently touch GPLv3 code, so we can't do the
testing. Stan, can you do this?
--
dalej at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |stanshebs at earthlink dot
| |net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36399
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/36399] FSF GCC ABI bug on darwin/x86-32
2008-05-31 9:03 [Bug c/36399] New: FSF GCC ABI bug on darwin/x86-32 sabre at nondot dot org
` (3 preceding siblings ...)
2009-06-04 0:06 ` dalej at gcc dot gnu dot org
@ 2009-06-07 14:27 ` hjl dot tools at gmail dot com
2009-06-08 19:17 ` dalej at gcc dot gnu dot org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-06-07 14:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from hjl dot tools at gmail dot com 2009-06-07 14:27 -------
(In reply to comment #4)
> Yeah. Looking through our local changes, I think you just need this line in
> i386.h:
>
> #define SSE_REGPARM_MAX (TARGET_64BIT ? 8 : (TARGET_MACHO ? 4 : (TARGET_SSE ? 3
> : 0)))
>
> However Apple employees can't currently touch GPLv3 code, so we can't do the
> testing. Stan, can you do this?
>
Shouldn't it be
#define SSE_REGPARM_MAX (TARGET_64BIT ? 8 : (TARGET_SSE ? (TARGET_MACHO ? 4 : 3
: 0)))
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36399
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/36399] FSF GCC ABI bug on darwin/x86-32
2008-05-31 9:03 [Bug c/36399] New: FSF GCC ABI bug on darwin/x86-32 sabre at nondot dot org
` (4 preceding siblings ...)
2009-06-07 14:27 ` hjl dot tools at gmail dot com
@ 2009-06-08 19:17 ` dalej at gcc dot gnu dot org
2009-12-29 20:21 ` [Bug target/36399] " fxcoudert at gcc dot gnu dot org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: dalej at gcc dot gnu dot org @ 2009-06-08 19:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from dalej at gcc dot gnu dot org 2009-06-08 19:17 -------
That needs to be parenthesized differently; if that's fixed, I have no
objection to doing it that way, but since all MachO targets have SSE, that
works too.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36399
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/36399] ABI bug on darwin/x86-32
2008-05-31 9:03 [Bug c/36399] New: FSF GCC ABI bug on darwin/x86-32 sabre at nondot dot org
` (5 preceding siblings ...)
2009-06-08 19:17 ` dalej at gcc dot gnu dot org
@ 2009-12-29 20:21 ` fxcoudert at gcc dot gnu dot org
2009-12-29 22:22 ` echristo at apple dot com
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2009-12-29 20:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from fxcoudert at gcc dot gnu dot org 2009-12-29 20:21 -------
Patch for current trunk:
Index: gcc/config/i386/i386.h
===================================================================
--- gcc/config/i386/i386.h (revision 155505)
+++ 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 \
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fxcoudert at gcc dot gnu dot
| |org
Keywords| |patch
Last reconfirmed|2009-06-03 21:18:11 |2009-12-29 20:21:12
date| |
Summary|FSF GCC ABI bug on |ABI bug on darwin/x86-32
|darwin/x86-32 |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36399
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/36399] ABI bug on darwin/x86-32
2008-05-31 9:03 [Bug c/36399] New: FSF GCC ABI bug on darwin/x86-32 sabre at nondot dot org
` (6 preceding siblings ...)
2009-12-29 20:21 ` [Bug target/36399] " fxcoudert at gcc dot gnu dot org
@ 2009-12-29 22:22 ` echristo at apple dot com
2010-03-11 14:13 ` howarth at nitro dot med dot uc dot edu
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: echristo at apple dot com @ 2009-12-29 22:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from echristo at apple dot com 2009-12-29 22:21 -------
That patch looks correct for at least x86-32
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36399
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/36399] ABI bug on darwin/x86-32
2008-05-31 9:03 [Bug c/36399] New: FSF GCC ABI bug on darwin/x86-32 sabre at nondot dot org
` (7 preceding siblings ...)
2009-12-29 22:22 ` echristo at apple dot com
@ 2010-03-11 14:13 ` howarth at nitro dot med dot uc dot edu
2010-03-11 14:24 ` rguenth at gcc dot gnu dot org
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2010-03-11 14:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from howarth at nitro dot med dot uc dot edu 2010-03-11 14:13 -------
Should we apply the patch from comment 7 before gcc 4.5 branches?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36399
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/36399] ABI bug on darwin/x86-32
2008-05-31 9:03 [Bug c/36399] New: FSF GCC ABI bug on darwin/x86-32 sabre at nondot dot org
` (8 preceding siblings ...)
2010-03-11 14:13 ` howarth at nitro dot med dot uc dot edu
@ 2010-03-11 14:24 ` rguenth at gcc dot gnu dot org
2010-03-12 4:06 ` howarth at nitro dot med dot uc dot edu
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-03-11 14:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from rguenth at gcc dot gnu dot org 2010-03-11 14:24 -------
(In reply to comment #9)
> Should we apply the patch from comment 7 before gcc 4.5 branches?
Well, you certainly need to follow patch submission rules. Thus, post
to gcc-patches w/ a changelog entry and stating how you tested the patch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36399
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/36399] ABI bug on darwin/x86-32
2008-05-31 9:03 [Bug c/36399] New: FSF GCC ABI bug on darwin/x86-32 sabre at nondot dot org
` (9 preceding siblings ...)
2010-03-11 14:24 ` rguenth at gcc dot gnu dot org
@ 2010-03-12 4:06 ` howarth at nitro dot med dot uc dot edu
2010-03-18 22:57 ` mrs at gcc dot gnu dot org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2010-03-12 4:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from howarth at nitro dot med dot uc dot edu 2010-03-12 04:06 -------
Patch posted at http://gcc.gnu.org/ml/gcc-patches/2010-03/msg00472.html.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36399
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/36399] ABI bug on darwin/x86-32
2008-05-31 9:03 [Bug c/36399] New: FSF GCC ABI bug on darwin/x86-32 sabre at nondot dot org
` (10 preceding siblings ...)
2010-03-12 4:06 ` howarth at nitro dot med dot uc dot edu
@ 2010-03-18 22:57 ` mrs at gcc dot gnu dot org
2010-03-18 22:58 ` mikestump at comcast dot net
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: mrs at gcc dot gnu dot org @ 2010-03-18 22:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from mrs at gcc dot gnu dot org 2010-03-18 22:57 -------
Subject: Bug 36399
Author: mrs
Date: Thu Mar 18 22:56:38 2010
New Revision: 157553
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157553
Log:
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.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.h
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.target/i386/push-1.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36399
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/36399] ABI bug on darwin/x86-32
2008-05-31 9:03 [Bug c/36399] New: FSF GCC ABI bug on darwin/x86-32 sabre at nondot dot org
` (11 preceding siblings ...)
2010-03-18 22:57 ` mrs at gcc dot gnu dot org
@ 2010-03-18 22:58 ` mikestump at comcast dot net
2010-03-23 0:10 ` mrs at gcc dot gnu dot org
2010-03-23 0:10 ` mrs at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: mikestump at comcast dot net @ 2010-03-18 22:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from mikestump at comcast dot net 2010-03-18 22:57 -------
Fix checked in as r157553.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36399
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/36399] ABI bug on darwin/x86-32
2008-05-31 9:03 [Bug c/36399] New: FSF GCC ABI bug on darwin/x86-32 sabre at nondot dot org
` (13 preceding siblings ...)
2010-03-23 0:10 ` mrs at gcc dot gnu dot org
@ 2010-03-23 0:10 ` mrs at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: mrs at gcc dot gnu dot org @ 2010-03-23 0:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from mrs at gcc dot gnu dot org 2010-03-23 00:10 -------
This has now been fixed.
--
mrs at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36399
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/36399] ABI bug on darwin/x86-32
2008-05-31 9:03 [Bug c/36399] New: FSF GCC ABI bug on darwin/x86-32 sabre at nondot dot org
` (12 preceding siblings ...)
2010-03-18 22:58 ` mikestump at comcast dot net
@ 2010-03-23 0:10 ` mrs at gcc dot gnu dot org
2010-03-23 0:10 ` mrs at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: mrs at gcc dot gnu dot org @ 2010-03-23 0:10 UTC (permalink / raw)
To: gcc-bugs
--
mrs at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.5.0
Version|4.5.0 |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36399
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2010-03-23 0:10 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-31 9:03 [Bug c/36399] New: FSF GCC ABI bug on darwin/x86-32 sabre at nondot dot org
2008-05-31 10:59 ` [Bug target/36399] " rguenth at gcc dot gnu dot org
2008-06-03 0:38 ` echristo at apple dot com
2009-06-03 21:18 ` fxcoudert at gcc dot gnu dot org
2009-06-04 0:06 ` dalej at gcc dot gnu dot org
2009-06-07 14:27 ` hjl dot tools at gmail dot com
2009-06-08 19:17 ` dalej at gcc dot gnu dot org
2009-12-29 20:21 ` [Bug target/36399] " fxcoudert at gcc dot gnu dot org
2009-12-29 22:22 ` echristo at apple dot com
2010-03-11 14:13 ` howarth at nitro dot med dot uc dot edu
2010-03-11 14:24 ` rguenth at gcc dot gnu dot org
2010-03-12 4:06 ` howarth at nitro dot med dot uc dot edu
2010-03-18 22:57 ` mrs at gcc dot gnu dot org
2010-03-18 22:58 ` mikestump at comcast dot net
2010-03-23 0:10 ` mrs at gcc dot gnu dot org
2010-03-23 0:10 ` mrs at gcc dot gnu dot org
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).