From patchwork Fri Jan 4 04:31:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John David Anglin X-Patchwork-Id: 209363 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 1056E2C0094 for ; Fri, 4 Jan 2013 15:32:49 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1357878770; h=Comment: DomainKey-Signature:Received:Received:Received:Received: Message-ID:Received:CC:From:To:In-Reply-To:Content-Type:Subject: MIME-Version:Date:References:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=eqFggS489CKvIdPOn1iiCUYkvNM=; b=fXC+qEJgDZAKuuG r/8RvqHkuAOxxZAXQ0KdhixwP1vCUacgjGzSByKRuvlkvs9vUplNoXpN+hZiO/A3 aBRBdYJbcgf9od2CFrwm+R+wYndcZxDLWBbLZqM9LIR0rQPORa/5wTQdQcbB7Wpm uwBvUSDLX+hILQ4n3Y8UkWjLHhOY= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-EIP:Message-ID:Received:CC:From:To:In-Reply-To:Content-Type:Subject:MIME-Version:Date:References:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=MlTetAlSHYz9075M2npW2egIsl8npD2aozoPEVIvsXbXCe/8e6qF2mm/6Eotve UUKqyzgB7cLd+8mLN01TY3rZsQj7FguA/ZSyeB3LFVWw8GK/hc1D/f+tUpncp2x4 72Lzzekex+odn+woWIQyXdOGowmD8PE9AdGqvtVHjRIZE=; Received: (qmail 14461 invoked by alias); 4 Jan 2013 04:32:42 -0000 Received: (qmail 14411 invoked by uid 22791); 4 Jan 2013 04:32:41 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, KAM_STOCKGEN, KHOP_THREADED, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_NONE, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from blu0-omc3-s31.blu0.hotmail.com (HELO blu0-omc3-s31.blu0.hotmail.com) (65.55.116.106) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Jan 2013 04:32:34 +0000 Received: from BLU0-SMTP68 ([65.55.116.72]) by blu0-omc3-s31.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 3 Jan 2013 20:32:32 -0800 X-EIP: [yf469NfUBuQIqVKGTypAc73q2cT/sWeP] Message-ID: Received: from [192.168.2.10] ([69.158.169.84]) by BLU0-SMTP68.blu0.hotmail.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Thu, 3 Jan 2013 20:32:31 -0800 CC: From: John David Anglin To: Richard Sandiford In-Reply-To: <87sj6j7mqn.fsf@talisman.default> Subject: Re: [committed] Fix ICE in gen_reg_rtx, at emit-rtl.c:864/865 compiling GNU MPFR MIME-Version: 1.0 (Apple Message framework v936) Date: Thu, 3 Jan 2013 23:31:52 -0500 References: <20121226193718.GA25173@hiauly1.hia.nrc.ca> <87sj6j7mqn.fsf@talisman.default> 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 Committed the attached change to trunk and 4.7 after testing on hppa- unknown-linux-gnu. Working on a revised change for 4.6. I don't think symbol + constant can occur but I'm not absolutely sure. On 2-Jan-13, at 8:12 AM, Richard Sandiford wrote: > In any case, reload needs to know up-front that the constant can't be > rematerialised, via LEGITIMATE_CONSTANT_P. emit_move_insn_1 would be > too late. It looks like PA already handles this for some TLS models: > > /* TLS_MODEL_GLOBAL_DYNAMIC and TLS_MODEL_LOCAL_DYNAMIC are not > legitimate constants. */ > if (PA_SYMBOL_REF_TLS_P (x)) > { > enum tls_model model = SYMBOL_REF_TLS_MODEL (x); > > if (model == TLS_MODEL_GLOBAL_DYNAMIC || model == > TLS_MODEL_LOCAL_DYNAMIC) > return false; > } > > so maybe that should just be: > > if (PA_SYMBOL_REF_TLS_P (x)) > return false; Dave --- John David Anglin dave.anglin@bell.net 2013-01-03 John David Anglin PR target/53789 * config/pa/pa.md (movsi): Revert previous change. * config/pa/pa.c (pa_legitimate_constant_p): Reject all TLS symbol references. Index: config/pa/pa.md =================================================================== --- config/pa/pa.md (revision 194824) +++ config/pa/pa.md (working copy) @@ -2094,12 +2155,6 @@ "" " { - /* A TLS symbol reference is not a valid move source operand. - pa_emit_move_sequence can only handle them prior to reload. - There is also no way to reload a TLS symbol reference, so - we must reject them after reload starts. */ - if (PA_SYMBOL_REF_TLS_P (operands[1]) && !can_create_pseudo_p ()) - FAIL; if (pa_emit_move_sequence (operands, SImode, 0)) DONE; }") Index: config/pa/pa.c =================================================================== --- config/pa/pa.c (revision 194824) +++ config/pa/pa.c (working copy) @@ -10358,15 +10358,11 @@ return false; /* TLS_MODEL_GLOBAL_DYNAMIC and TLS_MODEL_LOCAL_DYNAMIC are not - legitimate constants. */ + legitimate constants. The other variants can't be handled by + the move patterns after reload starts. */ if (PA_SYMBOL_REF_TLS_P (x)) - { - enum tls_model model = SYMBOL_REF_TLS_MODEL (x); + return false; - if (model == TLS_MODEL_GLOBAL_DYNAMIC || model == TLS_MODEL_LOCAL_DYNAMIC) - return false; - } - if (TARGET_64BIT && GET_CODE (x) == CONST_DOUBLE) return false;