[Bug target/15301] New: gcc does not pass __m128 arguments correctly
hjl at lucon dot org
gcc-bugzilla@gcc.gnu.org
Wed May 5 19:40:00 GMT 2004
#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
More information about the Gcc-bugs
mailing list