public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/15301] New: gcc does not pass __m128 arguments correctly
@ 2004-05-05 19:40 hjl at lucon dot org
  2004-05-05 19:41 ` [Bug target/15301] " hjl at lucon dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: hjl at lucon dot org @ 2004-05-05 19:40 UTC (permalink / raw)
  To: gcc-bugs

#include "xmmintrin.h"
typedef struct {
        __m128 x;
} SS_struct_mi128;

typedef union {
        __m128 x;
} SS_union_mi128;
SS_union_mi128  un;
SS_struct_mi128 st;
test()
{

   bar(un);
   foo(st);
}

For the given program the Union and Struct have the same fields.  gcc passes 
the struct according to document but does not do the right thing for Union. 
See output from gcc below

/*****************************************
        .file   "m128.c"
        .text
.globl test
        .type   test,@function
test:
.LFB378:
        pushq   %rbp
.LCFI0:
        movq    %rsp, %rbp
.LCFI1:
        movq    un(%rip), %xmm0
        movq    un+8(%rip), %xmm1
        movl    $1, %eax
        call    bar
        movaps  st(%rip), %xmm0
        movl    $1, %eax
        call    foo
        leave
        ret
.LFE378:
.Lfe1:
        .size   test,.Lfe1-test
        .comm   un,16,16
        .comm   st,16,16
        .section        .eh_frame,"a",@progbits
.Lframe1:
        .long   .LECIE1-.LSCIE1
.LSCIE1:

-- 
           Summary: gcc does not pass __m128 arguments correctly
           Product: gcc
           Version: 3.4.1
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hjl at lucon dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: x86_64-pc-linux-gnu
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15301


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

* [Bug target/15301] gcc does not pass __m128 arguments correctly
  2004-05-05 19:40 [Bug target/15301] New: gcc does not pass __m128 arguments correctly hjl at lucon dot org
  2004-05-05 19:41 ` [Bug target/15301] " hjl at lucon dot org
@ 2004-05-05 19:41 ` hjl at lucon dot org
  2004-05-13 12:15 ` hjl at lucon dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: hjl at lucon dot org @ 2004-05-05 19:41 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jh at suse dot cz
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15301


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

* [Bug target/15301] gcc does not pass __m128 arguments correctly
  2004-05-05 19:40 [Bug target/15301] New: gcc does not pass __m128 arguments correctly hjl at lucon dot org
@ 2004-05-05 19:41 ` hjl at lucon dot org
  2004-05-05 19:41 ` hjl at lucon dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: hjl at lucon dot org @ 2004-05-05 19:41 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ABI


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15301


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

* [Bug target/15301] gcc does not pass __m128 arguments correctly
  2004-05-05 19:40 [Bug target/15301] New: gcc does not pass __m128 arguments correctly hjl at lucon dot org
  2004-05-05 19:41 ` [Bug target/15301] " hjl at lucon dot org
  2004-05-05 19:41 ` hjl at lucon dot org
@ 2004-05-13 12:15 ` hjl at lucon dot org
  2004-05-18 16:52 ` hjl at lucon dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: hjl at lucon dot org @ 2004-05-13 12:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From hjl at lucon dot org  2004-05-13 00:51 -------
A testcase is posted at

http://gcc.gnu.org/ml/gcc-patches/2004-05/msg00485.html

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15301


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

* [Bug target/15301] gcc does not pass __m128 arguments correctly
  2004-05-05 19:40 [Bug target/15301] New: gcc does not pass __m128 arguments correctly hjl at lucon dot org
                   ` (2 preceding siblings ...)
  2004-05-13 12:15 ` hjl at lucon dot org
@ 2004-05-18 16:52 ` hjl at lucon dot org
  2004-05-18 18:29 ` hjl at lucon dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: hjl at lucon dot org @ 2004-05-18 16:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From hjl at lucon dot org  2004-05-18 03:52 -------
Mainline is fixed by

http://gcc.gnu.org/ml/gcc-cvs/2004-05/msg00563.html

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15301


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

* [Bug target/15301] gcc does not pass __m128 arguments correctly
  2004-05-05 19:40 [Bug target/15301] New: gcc does not pass __m128 arguments correctly hjl at lucon dot org
                   ` (3 preceding siblings ...)
  2004-05-18 16:52 ` hjl at lucon dot org
@ 2004-05-18 18:29 ` hjl at lucon dot org
  2004-05-18 18:41 ` [Bug target/15301] [3.4 only] " pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: hjl at lucon dot org @ 2004-05-18 18:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From hjl at lucon dot org  2004-05-18 03:54 -------
*** Bug 15302 has been marked as a duplicate of this bug. ***

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15301


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

* [Bug target/15301] [3.4 only] gcc does not pass __m128 arguments correctly
  2004-05-05 19:40 [Bug target/15301] New: gcc does not pass __m128 arguments correctly hjl at lucon dot org
                   ` (4 preceding siblings ...)
  2004-05-18 18:29 ` hjl at lucon dot org
@ 2004-05-18 18:41 ` pinskia at gcc dot gnu dot org
  2004-05-18 18:41 ` [Bug target/15301] [3.3/3.4 " cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-18 18:41 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal
            Summary|gcc does not pass __m128    |[3.4 only] gcc does not pass
                   |arguments correctly         |__m128 arguments correctly
   Target Milestone|---                         |3.4.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15301


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

* [Bug target/15301] [3.3/3.4 only] gcc does not pass __m128 arguments correctly
  2004-05-05 19:40 [Bug target/15301] New: gcc does not pass __m128 arguments correctly hjl at lucon dot org
                   ` (5 preceding siblings ...)
  2004-05-18 18:41 ` [Bug target/15301] [3.4 only] " pinskia at gcc dot gnu dot org
@ 2004-05-18 18:41 ` cvs-commit at gcc dot gnu dot org
  2004-05-18 19:22 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-05-18 18:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-05-18 05:08 -------
Subject: Bug 15301

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	hjl@gcc.gnu.org	2004-05-18 05:07:58

Modified files:
	gcc            : ChangeLog 
	gcc/config/i386: i386.c 

Log message:
	2004-05-17  H.J. Lu  <hongjiu.lu@intel.com>
	
	Backport from mainline
	
	PR debug/15301
	PR debug/15302
	2004-05-17  Jan Hubicka  <jh@suse.cz>
	
	* i386.c (construct_container): Do not produce BLKmode registers.
	(classify_argument): Properly compute alignment of complex types.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.981&r2=1.16114.2.982
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.495.2.35&r2=1.495.2.36



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15301


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

* [Bug target/15301] [3.3/3.4 only] gcc does not pass __m128 arguments correctly
  2004-05-05 19:40 [Bug target/15301] New: gcc does not pass __m128 arguments correctly hjl at lucon dot org
                   ` (6 preceding siblings ...)
  2004-05-18 18:41 ` [Bug target/15301] [3.3/3.4 " cvs-commit at gcc dot gnu dot org
@ 2004-05-18 19:22 ` cvs-commit at gcc dot gnu dot org
  2004-05-18 22:49 ` pinskia at gcc dot gnu dot org
  2004-05-22  1:47 ` cvs-commit at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-05-18 19:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-05-18 06:14 -------
Subject: Bug 15301

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	hjl@gcc.gnu.org	2004-05-18 06:14:23

Modified files:
	gcc            : ChangeLog 
	gcc/config/i386: i386.c 

Log message:
	2004-05-17  H.J. Lu  <hongjiu.lu@intel.com>
	
	Backport from mainline
	
	PR target/15301
	PR target/15302
	2004-05-17  Jan Hubicka  <jh@suse.cz>
	
	* i386.c (construct_container): Do not produce BLKmode registers.
	(classify_argument): Properly compute alignment of complex types.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.442&r2=2.2326.2.443
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.635.2.10&r2=1.635.2.11



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15301


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

* [Bug target/15301] [3.3/3.4 only] gcc does not pass __m128 arguments correctly
  2004-05-05 19:40 [Bug target/15301] New: gcc does not pass __m128 arguments correctly hjl at lucon dot org
                   ` (7 preceding siblings ...)
  2004-05-18 19:22 ` cvs-commit at gcc dot gnu dot org
@ 2004-05-18 22:49 ` pinskia at gcc dot gnu dot org
  2004-05-22  1:47 ` cvs-commit at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-18 22:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-18 11:35 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|3.4.1                       |3.3.4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15301


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

* [Bug target/15301] [3.3/3.4 only] gcc does not pass __m128 arguments correctly
  2004-05-05 19:40 [Bug target/15301] New: gcc does not pass __m128 arguments correctly hjl at lucon dot org
                   ` (8 preceding siblings ...)
  2004-05-18 22:49 ` pinskia at gcc dot gnu dot org
@ 2004-05-22  1:47 ` cvs-commit at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-05-22  1:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-05-21 00:13 -------
Subject: Bug 15301

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	hjl@gcc.gnu.org	2004-05-21 00:13:04

Modified files:
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg/compat: union-m128-1.h union-m128-1_main.c 
	                             union-m128-1_x.c union-m128-1_y.c 

Log message:
	2004-05-20  H.J. Lu  <hongjiu.lu@intel.com>
	
	PR target/15301
	* gcc.dg/compat/union-m128-1.h: New file.
	* gcc.dg/compat/union-m128-1_main.c: Likewise.
	* gcc.dg/compat/union-m128-1_x.c: Likewise.
	* gcc.dg/compat/union-m128-1_y.c: Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3766&r2=1.3767
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/compat/union-m128-1.h.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/compat/union-m128-1_main.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/compat/union-m128-1_x.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/compat/union-m128-1_y.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15301


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

end of thread, other threads:[~2004-05-21  0:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-05 19:40 [Bug target/15301] New: gcc does not pass __m128 arguments correctly hjl at lucon dot org
2004-05-05 19:41 ` [Bug target/15301] " hjl at lucon dot org
2004-05-05 19:41 ` hjl at lucon dot org
2004-05-13 12:15 ` hjl at lucon dot org
2004-05-18 16:52 ` hjl at lucon dot org
2004-05-18 18:29 ` hjl at lucon dot org
2004-05-18 18:41 ` [Bug target/15301] [3.4 only] " pinskia at gcc dot gnu dot org
2004-05-18 18:41 ` [Bug target/15301] [3.3/3.4 " cvs-commit at gcc dot gnu dot org
2004-05-18 19:22 ` cvs-commit at gcc dot gnu dot org
2004-05-18 22:49 ` pinskia at gcc dot gnu dot org
2004-05-22  1:47 ` cvs-commit 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).