From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3817 invoked by alias); 13 Sep 2009 01:55:07 -0000 Received: (qmail 3559 invoked by uid 22791); 13 Sep 2009 01:55:06 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-ew0-f226.google.com (HELO mail-ew0-f226.google.com) (209.85.219.226) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 13 Sep 2009 01:55:02 +0000 Received: by ewy26 with SMTP id 26so1997189ewy.29 for ; Sat, 12 Sep 2009 18:55:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.3.195 with SMTP id 45mr394407weh.8.1252806900477; Sat, 12 Sep 2009 18:55:00 -0700 (PDT) In-Reply-To: References: <20090807071305.GX4462@tyan-ft48-01.lab.bos.redhat.com> <6dc9ffc80908070553q6f9b1b78lc19e6e4a4a5ec73b@mail.gmail.com> <6dc9ffc80908071530x7d4a3965u8021df66a142a0bf@mail.gmail.com> <6dc9ffc80908240900l73d3c97fo2c31fbd0142e75d2@mail.gmail.com> Date: Sun, 13 Sep 2009 01:55:00 -0000 Message-ID: <6dc9ffc80909121855i6c021ab4m863620dad345e208@mail.gmail.com> Subject: Re: PATCH: PR target/40838: gcc shouldn't assume that the stack is aligned From: "H.J. Lu" To: Mikulas Patocka Cc: Jakub Jelinek , gcc-patches@gcc.gnu.org, ubizjak@gmail.com Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2009-09/txt/msg00898.txt.bz2 2009/9/12 Mikulas Patocka : > > I tried this patch for 4.4.1 (that one posted in bugzilla 40838) with > seamonkey 1.1.17 and it relly misses alignment in some parts of it. I used > CFLAGS and CXXFLAGS "-O3 -fomit-frame-pointer -frename-registers > -march=barcelona" > > I found the functions that miscompile, the trivial way to find them is to > compile seamonkey, do find . -name "*.o"|xargs objdump -d|less, search for > "movdqa.*esp" or "movaps.*esp" (or even "esp.*xmm" and "xmm.*esp", but it > gives more false positives) and check the function that it has aligment > code. There are a few functions that don't. Please look at these > functions, the idea of your patch is good, it just needs to be fixed. > > BTW. gentoo documentation lists -O3 as problematic flag that leads to > instability with gcc 4 (they don't way why, but the most likely reason is > this alignment issue), it would be good if we could fix it and allow > people to use SSE. > Please find a small testcase and upload it to PR 40838. Thank.s Thanks. -- H.J.