From patchwork Fri Oct 17 14:08:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evgeny Stupachenko X-Patchwork-Id: 400533 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 3ED821400DD for ; Sat, 18 Oct 2014 01:08:23 +1100 (AEDT) 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=LanwN3+Am6rUIoL6JnBu3nto/Pmz3dTtp67+5wz3WD5WiQ UqgVEJgeLjCGm6PC+py3rs5NCNe4UAwUusYYCikXnQPn9BL2jLRzlSIO2Pw19QN5 js552wrTkOtxsMAu6a04diiw6mVbZNKnEgWEoAB4VOtD7yfp0BDKRQhbU65vY= 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=TuUjSpj7iORbO8w0wRtpfcvn4Ow=; b=UYAH3xaE/DVO8iALWqv1 v4CTDyk8MIyAS5PKAg/D+rdsOfwFo88Zw4csunZGRZJAiOTi0io2yJzVlNjli/I2 p464+FCNIZ1XS6PL6o9k8V2AGJ3oJ3D4GkYNJGyA84x1kfYRhrqHXeeGwzidSLo0 eBd7n4BQVGO4f/qgen2Y0bg= Received: (qmail 18838 invoked by alias); 17 Oct 2014 14:08:15 -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 18822 invoked by uid 89); 17 Oct 2014 14:08:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-ie0-f171.google.com Received: from mail-ie0-f171.google.com (HELO mail-ie0-f171.google.com) (209.85.223.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 17 Oct 2014 14:08:08 +0000 Received: by mail-ie0-f171.google.com with SMTP id tr6so797492ieb.30 for ; Fri, 17 Oct 2014 07:08:06 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.42.224.3 with SMTP id im3mr10579707icb.49.1413554886153; Fri, 17 Oct 2014 07:08:06 -0700 (PDT) Received: by 10.107.6.95 with HTTP; Fri, 17 Oct 2014 07:08:06 -0700 (PDT) Date: Fri, 17 Oct 2014 18:08:06 +0400 Message-ID: Subject: [PARCH 1/2, x86, PR63534] Fix darwin bootstrap From: Evgeny Stupachenko To: GCC Patches , Uros Bizjak , Jakub Jelinek , Jeff Law , iains@gcc.gnu.org X-IsSubscribed: yes Hi, The patch fixes 1st fail in darwin bootstarp. When PIC register is pseudo we don't need to init it after setjmp or non local goto. Is it ok? ChangeLog: 2014-10-17 Evgeny Stupachenko PR target/63534 * config/i386/i386.c (builtin_setjmp_receiver): Delete. (nonlocal_goto_receiver): Ditto. diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 624a1c1..fc3776f 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -16927,57 +16927,6 @@ "* return output_probe_stack_range (operands[0], operands[2]);" [(set_attr "type" "multi")]) -(define_expand "builtin_setjmp_receiver" - [(label_ref (match_operand 0))] - "!TARGET_64BIT && flag_pic" -{ -#if TARGET_MACHO - if (TARGET_MACHO) - { - rtx xops[3]; - rtx picreg = gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM); - rtx_code_label *label_rtx = gen_label_rtx (); - emit_insn (gen_set_got_labelled (pic_offset_table_rtx, label_rtx)); - xops[0] = xops[1] = picreg; - xops[2] = machopic_gen_offset (gen_rtx_LABEL_REF (SImode, label_rtx)); - ix86_expand_binary_operator (MINUS, SImode, xops); - } - else -#endif - emit_insn (gen_set_got (pic_offset_table_rtx)); - DONE; -}) - -(define_insn_and_split "nonlocal_goto_receiver" - [(unspec_volatile [(const_int 0)] UNSPECV_NLGR)] - "TARGET_MACHO && !TARGET_64BIT && flag_pic" - "#" - "&& reload_completed" - [(const_int 0)] -{ - if (crtl->uses_pic_offset_table) - { - rtx xops[3]; - rtx label_rtx = gen_label_rtx (); - rtx tmp; - - /* Get a new pic base. */ - emit_insn (gen_set_got_labelled (pic_offset_table_rtx, label_rtx)); - /* Correct this with the offset from the new to the old. */ - xops[0] = xops[1] = pic_offset_table_rtx; - label_rtx = gen_rtx_LABEL_REF (SImode, label_rtx); - tmp = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, label_rtx), - UNSPEC_MACHOPIC_OFFSET); - xops[2] = gen_rtx_CONST (Pmode, tmp); - ix86_expand_binary_operator (MINUS, SImode, xops); - } - else - /* No pic reg restore needed. */ - emit_note (NOTE_INSN_DELETED); - - DONE; -}) - ;; Avoid redundant prefixes by splitting HImode arithmetic to SImode. ;; Do not split instructions with mask registers. (define_split