From patchwork Fri Feb 14 11:36:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai Tietz X-Patchwork-Id: 320402 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 2E5BA2C00B1 for ; Fri, 14 Feb 2014 22:36:16 +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=W+dqBEG10E3CujAwH0/YVgWhEvw6aoGpBvcTIccsn/xMwo 6Uz4lNS5Bl6XNHI3Nroii1gNxvmQ4UG5CVmyAsHyhw5iNWqzYQPF836HL+eaN0Wz cjEslSMd26lDkT6vw8OeyWwpea3cWEo8G3IMjmrNggnQA/EFmZUmC+D+ltvrg= 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=0Et580GfUr3qCp1hNpEE+Psosys=; b=TM/UZDFpKIbxP9WQOSYh LZNCvyZkPCaVYm1t+P2f0jHX981tJn5q6O6XwXnMGMETcqeM1FtFNZ72Up2jNmD+ gchqKxVCZz2Uj5DKxtJYoctVaBl+ha446qpOx6sbaU1BF+JcgNokm/ugd56KViXx 9TnuF/EsTvplCb3m61DIsXw= Received: (qmail 27761 invoked by alias); 14 Feb 2014 11:36:08 -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 27751 invoked by uid 89); 14 Feb 2014 11:36:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 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-qc0-f182.google.com Received: from mail-qc0-f182.google.com (HELO mail-qc0-f182.google.com) (209.85.216.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 14 Feb 2014 11:36:04 +0000 Received: by mail-qc0-f182.google.com with SMTP id c9so19624368qcz.41 for ; Fri, 14 Feb 2014 03:36:02 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.224.114.78 with SMTP id d14mr12070248qaq.19.1392377762311; Fri, 14 Feb 2014 03:36:02 -0800 (PST) Received: by 10.96.131.102 with HTTP; Fri, 14 Feb 2014 03:36:02 -0800 (PST) Date: Fri, 14 Feb 2014 12:36:02 +0100 Message-ID: Subject: [patch i386]: Fix PR/60193 From: Kai Tietz To: GCC Patches , Eric Botcazou X-IsSubscribed: yes Hi, ChangeLog 2014-02-14 Kai Tietz PR target/60193 * config/i386/i386.c (ix86_expand_prologue): Use rax register as displacement for restoring %r10, %eax. Regression-tested for x86_64-unknown-linux-gnu, and x86_64-w64-mingw32, and i686-w64-mingw32. Ok for apply? Regards, Kai Index: i386.c =================================================================== --- i386.c (Revision 207686) +++ i386.c (Arbeitskopie) @@ -11084,17 +11084,20 @@ ix86_expand_prologue (void) works for realigned stack, too. */ if (r10_live && eax_live) { - t = plus_constant (Pmode, stack_pointer_rtx, allocate); + rtx eax = gen_rtx_REG (word_mode, AX_REG); + t = gen_rtx_PLUS (Pmode, stack_pointer_rtx, eax); emit_move_insn (gen_rtx_REG (word_mode, R10_REG), gen_frame_mem (word_mode, t)); - t = plus_constant (Pmode, stack_pointer_rtx, - allocate - UNITS_PER_WORD); + t = plus_constant (Pmode, eax, UNITS_PER_WORD); + emit_move_insn (eax, t); + t = gen_rtx_PLUS (Pmode, stack_pointer_rtx, eax); emit_move_insn (gen_rtx_REG (word_mode, AX_REG), gen_frame_mem (word_mode, t)); } else if (eax_live || r10_live) { - t = plus_constant (Pmode, stack_pointer_rtx, allocate); + rtx eax = gen_rtx_REG (word_mode, AX_REG); + t = gen_rtx_PLUS (Pmode, stack_pointer_rtx, eax); emit_move_insn (gen_rtx_REG (word_mode, (eax_live ? AX_REG : R10_REG)), gen_frame_mem (word_mode, t));