From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27913 invoked by alias); 7 Nov 2003 10:42:03 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 27897 invoked by uid 48); 7 Nov 2003 10:42:00 -0000 Date: Fri, 07 Nov 2003 10:42:00 -0000 Message-ID: <20031107104200.27896.qmail@sources.redhat.com> From: "kbowers at lanl dot gov" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20031105013127.12902.kbowers@lanl.gov> References: <20031105013127.12902.kbowers@lanl.gov> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/12902] Invalid assembly generated when using SSE / xmmintrin.h X-Bugzilla-Reason: CC X-SW-Source: 2003-11/txt/msg00477.txt.bz2 List-Id: 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 # .v, __A movl 8(%ebp), %eax # a movlps (%eax), %xmm0 # movaps -200(%ebp), %xmm1 movlps 8(%eax), %xmm1 movhps 16(%eax), %xmm0 # 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.