From patchwork Wed Dec 26 19:37:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John David Anglin X-Patchwork-Id: 208204 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 624C02C0093 for ; Thu, 27 Dec 2012 06:37:36 +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=1357155457; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Date: From:To:Subject:Message-ID:Reply-To:MIME-Version:Content-Type: Content-Disposition:User-Agent:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=J60tnJxtjmGWEpJzMA84WuTVWWs=; b=gMcHz8KpaMMGAgN R1/nHgX6+ACkZeNiRMjyLVa8mB+la5BzO7bwKUwtrRk70rpUoqdVAAU+lCSoU88I cRmxaSWhIRy+oG5995FHRLjeL2CbQah3wthLnpMwupZN4xiKWHHU5utUx85XL3OB 5uozgMp7QxJWUjte3I1+zwjHtbaQ= 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:Date:From:To:Subject:Message-ID:Reply-To:MIME-Version:Content-Type:Content-Disposition:User-Agent:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=dfyOCplkJ2nwNpg2OFrzP55IX7FBNj1LspSR7H0f1PBRKN3V2/Kw7YWaqdhwOM qifrt2yUCNPD+bG6jEOrZQ4aJXL3Szfeu3BknSn8g34reUdwlpT1WmDIqwYm2Eer sSxrqJU3j6Xpb+EhglS7Cj7pCwJn6/HivsXjJqOF6sLRY=; Received: (qmail 16656 invoked by alias); 26 Dec 2012 19:37:29 -0000 Received: (qmail 16530 invoked by uid 22791); 26 Dec 2012 19:37:27 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL, BAYES_00, KAM_STOCKGEN, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from hiauly1.hia.nrc.ca (HELO hiauly1.hia.nrc.ca) (132.246.10.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 26 Dec 2012 19:37:22 +0000 Received: by hiauly1.hia.nrc.ca (Postfix, from userid 1000) id 794DC50EA; Wed, 26 Dec 2012 14:37:19 -0500 (EST) Date: Wed, 26 Dec 2012 14:37:18 -0500 From: John David Anglin To: gcc-patches@gcc.gnu.org Subject: [committed] Fix ICE in gen_reg_rtx, at emit-rtl.c:864/865 compiling GNU MPFR Message-ID: <20121226193718.GA25173@hiauly1.hia.nrc.ca> Reply-To: John David Anglin MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.16 (2007-06-09) 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 The attached change fixes PR target/5379. ICE occurs when reload tries to emit a move instruction containing a TLS symbol reference as the source operand. This requires several scratch registers. As a result, it isn't possible for a reload pattern to handle this case. So, the best solution was to reject TLS symbol reference source operands after reload starts. Tested on hppa-unknown-linux-gnu and hppa2.0w-hp-hpux11.11 with not observed regressions. Committed to all active branches. Dave Index: config/pa/pa.md =================================================================== --- config/pa/pa.md (revision 194709) +++ config/pa/pa.md (working copy) @@ -2051,6 +2110,12 @@ "" " { + /* 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; }")