From patchwork Thu Aug 5 18:08:57 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 61011 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 9314CB6F0D for ; Fri, 6 Aug 2010 04:09:06 +1000 (EST) Received: (qmail 30614 invoked by alias); 5 Aug 2010 18:09:04 -0000 Received: (qmail 30605 invoked by uid 22791); 5 Aug 2010 18:09:04 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from b.mail.sonic.net (HELO b.mail.sonic.net) (64.142.19.5) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 05 Aug 2010 18:08:59 +0000 Received: from are.twiddle.net (are.twiddle.net [75.101.38.216]) by b.mail.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id o75I8vcA027956 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 5 Aug 2010 11:08:57 -0700 Received: from anchor.twiddle.home (anchor.twiddle.home [172.31.0.4]) by are.twiddle.net (8.14.4/8.14.4) with ESMTP id o75I8v43007449; Thu, 5 Aug 2010 11:08:57 -0700 Message-ID: <4C5AFE39.8090008@twiddle.net> Date: Thu, 05 Aug 2010 11:08:57 -0700 From: Richard Henderson User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.7) Gecko/20100720 Fedora/3.1.1-1.fc13 Thunderbird/3.1.1 MIME-Version: 1.0 To: "H.J. Lu" CC: gcc-patches@gcc.gnu.org, kai.tietz@onevision.com, ubizjak@gmail.com Subject: Re: [PATCH 6/9] Emit the prologue/epilogue using frame offsets. References: <1280879596-1089-1-git-send-email-rth@twiddle.net> <1280879596-1089-7-git-send-email-rth@twiddle.net> <4C5AD86F.3020206@twiddle.net> <4C5ADBA8.7050706@twiddle.net> In-Reply-To: Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On 08/05/2010 09:18 AM, H.J. Lu wrote: >> FAIL: g++.dg/torture/stackalign/eh-thiscall-1.C -O2 -fwhopr execution test >> >> I saw them on Fedora 13. >> > > Those failing tests are compiled with -fpic. Here is stack trace with > -O -fpic -static: Fixed. The problem was improper computation of the mask used for the unwind info. The test could still pass at runtime depending on the memory layout that the program receives. r~ PR target/45189 * config/i386/i386.c (ix86_emit_save_reg_using_mov): Make sure the alignment constant is properly sign-extended. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index dd81825..204211a 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -8639,7 +8639,8 @@ ix86_emit_save_reg_using_mov (enum machine_mode mode, unsigned int regno, reference to the locations within the frame. Instead, simply compute the location of the aligned frame from the frame pointer. */ - addr = GEN_INT (-crtl->stack_alignment_needed / BITS_PER_UNIT); + addr = GEN_INT (-(HOST_WIDE_INT)crtl->stack_alignment_needed + / BITS_PER_UNIT); addr = gen_rtx_AND (Pmode, hard_frame_pointer_rtx, addr); addr = plus_constant (addr, -cfa_offset); mem = gen_rtx_MEM (mode, addr);