This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12902] Invalid assembly generated when using SSE / xmmintrin.h
- From: "kbowers at lanl dot gov" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Nov 2003 10:42:00 -0000
- Subject: [Bug c++/12902] Invalid assembly generated when using SSE / xmmintrin.h
- References: <20031105013127.12902.kbowers@lanl.gov>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12902
------- Additional Comments From kbowers at lanl dot gov 2003-11-07 10:41 -------
I think I've found and fixed the bug. The bug appears to be the ambiguity issue
from my prior comment. I replaced the mov[h,l]p[s,d] instructions with more
appropriate versions as mentioned in my prior note. The attachments are the
diffs of the changes I made to i386.c and i386.md that allowed the original
program to compile properly:
$ gcc-3.3.2a -S -fverbose-asm -O -msse bug_12902.cpp
$ cat bug_12902.s
... snip ...
.L45:
movaps -40(%ebp), %xmm0 # <variable>.v, __A
movl 8(%ebp), %eax # a
movlps (%eax), %xmm0 # <anonymous>
movaps -200(%ebp), %xmm1
movlps 8(%eax), %xmm1
movhps 16(%eax), %xmm0 # <anonymous>
movhps 24(%eax), %xmm1
movaps %xmm1, -200(%ebp)
I don't know if the given diffs are the ideal way to make these modifications
but it seems to work. I learned the .md format about an hour ago by examining
other SSE instructions and so it is quite possible I've done it all wrong. To
the end, I am mildly concerned that load[h,l]p[s,d] need to be split like
sse_load_ss / sse_load_ss_1 to properly initialize some elements of the
vec_duplicate:V4SF.