From patchwork Sat Apr 23 07:35:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 92607 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 C9AE41007E1 for ; Sat, 23 Apr 2011 17:35:59 +1000 (EST) Received: (qmail 29353 invoked by alias); 23 Apr 2011 07:35:55 -0000 Received: (qmail 29242 invoked by uid 22791); 23 Apr 2011 07:35:53 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-pv0-f175.google.com (HELO mail-pv0-f175.google.com) (74.125.83.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 23 Apr 2011 07:35:39 +0000 Received: by pvc30 with SMTP id 30so734605pvc.20 for ; Sat, 23 Apr 2011 00:35:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.62.42 with SMTP id k42mr1191003wfa.230.1303544138967; Sat, 23 Apr 2011 00:35:38 -0700 (PDT) Received: by 10.142.87.14 with HTTP; Sat, 23 Apr 2011 00:35:38 -0700 (PDT) In-Reply-To: <201104222338.01126.ebotcazou@adacore.com> References: <201104222338.01126.ebotcazou@adacore.com> Date: Sat, 23 Apr 2011 09:35:38 +0200 Message-ID: Subject: Re: [PATCH, i386]: Fix PR target/48723 From: Uros Bizjak To: Eric Botcazou Cc: gcc-patches@gcc.gnu.org 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 Fri, Apr 22, 2011 at 11:38 PM, Eric Botcazou wrote: >> Attached one-liner fixes PR target/48723, ICE in >> ix86_expand_prologue() with -fstack-check + function returning struct, >> on corei7-avx. The problem was, that we forgot to update accounting >> info when ix86_adjust_stack_and_probe adjusted stack pointer (in this >> particular case, m->fs.sp_offset was set by stack realignment code for >> AVX 32byte stack alignment. > > Take a look at line 10165 of config/i386/i386.c. Uros. Index: i386.c =================================================================== --- i386.c (revision 172866) +++ i386.c (working copy) @@ -10149,7 +10149,7 @@ ix86_adjust_stack_and_probe (const HOST_ /* Even if the stack pointer isn't the CFA register, we need to correctly describe the adjustments made to it, in particular differentiate the frame-related ones from the frame-unrelated ones. */ - if (size > 0) + if (size != 0) { rtx expr = gen_rtx_SEQUENCE (VOIDmode, rtvec_alloc (2)); XVECEXP (expr, 0, 0)