From patchwork Fri Dec 6 17:06:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai Tietz X-Patchwork-Id: 298104 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 8423C2C00A2 for ; Sat, 7 Dec 2013 04:06:31 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:date:message-id:subject:from:to:content-type; q= dns; s=default; b=hxNcHj+MjyVIodHK1kVaweph0eEAg9g5puIVstX73mUR20 FlAxZaa+cU2HzmMjZ/jwuRw87yOhQZGyh/R+4dVlxI7XEN1WP3HGCxMD2fj5JLGk cNdUMB2llJeNZugIMOUruVlqgkIVbRdO8LkQ7iuPn3/7z54pHDhmCC7YOrMTw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:date:message-id:subject:from:to:content-type; s= default; bh=d50Vxl8x5Di3deK6gjcS/9C6X5k=; b=RiLNIAUveOirxgZ7pL7T RDJVnZeq8W7hR6oKQS2OMKt+XSt0p6XIq05tqJcK1tBJThf/Ba2kRKXd3/AzZOwN cO+rtcqYgjIqTgwfnNHkPmKei8VIddpIU9uVaAVdifpYY1g5tLQMviKx/CgRgO+H R0zRx+ViGyJ+V0PMwfLhu5M= Received: (qmail 25672 invoked by alias); 6 Dec 2013 17:06:23 -0000 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 Received: (qmail 25656 invoked by uid 89); 6 Dec 2013 17:06:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ie0-f172.google.com Received: from Unknown (HELO mail-ie0-f172.google.com) (209.85.223.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 06 Dec 2013 17:06:22 +0000 Received: by mail-ie0-f172.google.com with SMTP id qd12so1745605ieb.3 for ; Fri, 06 Dec 2013 09:06:14 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.42.209.208 with SMTP id gh16mr3198358icb.65.1386349574227; Fri, 06 Dec 2013 09:06:14 -0800 (PST) Received: by 10.64.10.170 with HTTP; Fri, 6 Dec 2013 09:06:14 -0800 (PST) Date: Fri, 6 Dec 2013 18:06:14 +0100 Message-ID: Subject: [patch i386]: Fix PR 56807 From: Kai Tietz To: GCC Patches X-IsSubscribed: yes Hi, ChangeLog 2013-12-06 Kai Tietz PR target/56807 * config/i386/i386.c (ix86_expand_prologue): Tested for i686-w64-mingw32, x86_64-unknown-linux-gnu. Ok for apply? Regards, Kai Index: config/i386/i386.c =================================================================== --- config/i386/i386.c (Revision 205719) +++ config/i386/i386.c (Arbeitskopie) @@ -10934,18 +10937,21 @@ ix86_expand_prologue (void) } m->fs.sp_offset += allocate; + /* Use stack_pointer_rtx for relative addressing so that code + works for realigned stack, too. */ if (r10_live && eax_live) { - t = choose_baseaddr (m->fs.sp_offset - allocate); + t = plus_constant (Pmode, stack_pointer_rtx, allocate); emit_move_insn (gen_rtx_REG (word_mode, R10_REG), gen_frame_mem (word_mode, t)); - t = choose_baseaddr (m->fs.sp_offset - allocate - UNITS_PER_WORD); + t = plus_constant (Pmode, stack_pointer_rtx, + allocate - UNITS_PER_WORD); emit_move_insn (gen_rtx_REG (word_mode, AX_REG), gen_frame_mem (word_mode, t)); } else if (eax_live || r10_live) { - t = choose_baseaddr (m->fs.sp_offset - allocate); + t = plus_constant (Pmode, stack_pointer_rtx, allocate); emit_move_insn (gen_rtx_REG (word_mode, (eax_live ? AX_REG : R10_REG)), gen_frame_mem (word_mode, t));