From patchwork Tue Dec 11 18:37:36 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 205292 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 C65902C007C for ; Wed, 12 Dec 2012 05:46:50 +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=1355856411; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:From:To:Subject:Date:Message-ID:User-Agent:MIME-Version: Content-Type:Content-Transfer-Encoding:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=8MCbdCyH8Yu5kUzF5zYyFqgrsYE=; b=xuBRgvl7xfKgNRj lWtjT9P/gdJ6V7aI/rdYaNClQLhUCpcoUGR1TYTyR3Ad9V22dWGbjlZS9SXMA5cz pCmcD0iv7u49rwYmnw6STxIXvLPwQC/l25oiMBNrlZx7IPHj58D2Pz0jimriru8u nQQI2pOeKwaVNPlj/8Cnage5Bv0k= 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:Received:Received:From:To:Subject:Date:Message-ID:User-Agent:MIME-Version:Content-Type:Content-Transfer-Encoding:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=HGRA9n/+qZqyOQ0rwjY9F//EBrkxRE9iW13FbRCFfYZv+gu10z0WJYAs3o/7aj NaxrDvE+4IkiANRnvgfNHBGJRByIJzk3MhjuuKMmRI3tfFGzxpgIjRtgdDBFnBp3 mmX3mhly3PPa6MNp/ECH+fR1ZG5rRV5g2MQOXbZSsXk5s=; Received: (qmail 5147 invoked by alias); 11 Dec 2012 18:46:46 -0000 Received: (qmail 5137 invoked by uid 22791); 11 Dec 2012 18:46:44 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 11 Dec 2012 18:46:39 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 94AC2CB3E48 for ; Tue, 11 Dec 2012 19:46:43 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id E-ZPw+iYece9 for ; Tue, 11 Dec 2012 19:46:43 +0100 (CET) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 4CE69CB34B9 for ; Tue, 11 Dec 2012 19:46:43 +0100 (CET) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [SPARC] Fix PR target/54121 Date: Tue, 11 Dec 2012 19:37:36 +0100 Message-ID: <4617091.BFNxLO7VlM@polaris> User-Agent: KMail/4.7.2 (Linux/3.1.10-1.16-desktop; KDE/4.7.2; x86_64; ; ) MIME-Version: 1.0 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 This is a regression present on mainline and 4.7 branch for the SPARC. Reload is trying to change the value of a symbol(!) because it is mightily confused by an output constraint on a source operand (old pasto in some TLS patterns). Fixed thusly, tested on SPARC64/Linux, applied on all branches. 2012-12-11 Eric Botcazou PR target/54121 * config/sparc/sparc.md (tldo_stb_sp32): Fix pasto. (tldo_stb_sp64): Likewise. (tldo_sth_sp32): Likewise. (tldo_sth_sp64): Likewise. (tldo_stw_sp32): Likewise. (tldo_stw_sp64): Likewise. (tldo_stx_sp64): Likewise. 2012-12-11 Eric Botcazou * gcc.dg/pr54121.c: New test. Index: config/sparc/sparc.md =================================================================== --- config/sparc/sparc.md (revision 194382) +++ config/sparc/sparc.md (working copy) @@ -7757,7 +7757,7 @@ (define_insn "*tldo_stb_sp32" (match_operand 3 "tld_symbolic_operand" "")] UNSPEC_TLSLDO) (match_operand:SI 1 "register_operand" "r"))) - (match_operand:QI 0 "register_operand" "=r"))] + (match_operand:QI 0 "register_operand" "r"))] "TARGET_TLS && TARGET_ARCH32" "stb\t%0, [%1 + %2], %%tldo_add(%3)" [(set_attr "type" "store")]) @@ -7767,7 +7767,7 @@ (define_insn "*tldo_stb_sp64" (match_operand 3 "tld_symbolic_operand" "")] UNSPEC_TLSLDO) (match_operand:DI 1 "register_operand" "r"))) - (match_operand:QI 0 "register_operand" "=r"))] + (match_operand:QI 0 "register_operand" "r"))] "TARGET_TLS && TARGET_ARCH64" "stb\t%0, [%1 + %2], %%tldo_add(%3)" [(set_attr "type" "store")]) @@ -7777,7 +7777,7 @@ (define_insn "*tldo_sth_sp32" (match_operand 3 "tld_symbolic_operand" "")] UNSPEC_TLSLDO) (match_operand:SI 1 "register_operand" "r"))) - (match_operand:HI 0 "register_operand" "=r"))] + (match_operand:HI 0 "register_operand" "r"))] "TARGET_TLS && TARGET_ARCH32" "sth\t%0, [%1 + %2], %%tldo_add(%3)" [(set_attr "type" "store")]) @@ -7787,7 +7787,7 @@ (define_insn "*tldo_sth_sp64" (match_operand 3 "tld_symbolic_operand" "")] UNSPEC_TLSLDO) (match_operand:DI 1 "register_operand" "r"))) - (match_operand:HI 0 "register_operand" "=r"))] + (match_operand:HI 0 "register_operand" "r"))] "TARGET_TLS && TARGET_ARCH64" "sth\t%0, [%1 + %2], %%tldo_add(%3)" [(set_attr "type" "store")]) @@ -7797,7 +7797,7 @@ (define_insn "*tldo_stw_sp32" (match_operand 3 "tld_symbolic_operand" "")] UNSPEC_TLSLDO) (match_operand:SI 1 "register_operand" "r"))) - (match_operand:SI 0 "register_operand" "=r"))] + (match_operand:SI 0 "register_operand" "r"))] "TARGET_TLS && TARGET_ARCH32" "st\t%0, [%1 + %2], %%tldo_add(%3)" [(set_attr "type" "store")]) @@ -7807,7 +7807,7 @@ (define_insn "*tldo_stw_sp64" (match_operand 3 "tld_symbolic_operand" "")] UNSPEC_TLSLDO) (match_operand:DI 1 "register_operand" "r"))) - (match_operand:SI 0 "register_operand" "=r"))] + (match_operand:SI 0 "register_operand" "r"))] "TARGET_TLS && TARGET_ARCH64" "stw\t%0, [%1 + %2], %%tldo_add(%3)" [(set_attr "type" "store")]) @@ -7817,7 +7817,7 @@ (define_insn "*tldo_stx_sp64" (match_operand 3 "tld_symbolic_operand" "")] UNSPEC_TLSLDO) (match_operand:DI 1 "register_operand" "r"))) - (match_operand:DI 0 "register_operand" "=r"))] + (match_operand:DI 0 "register_operand" "r"))] "TARGET_TLS && TARGET_ARCH64" "stx\t%0, [%1 + %2], %%tldo_add(%3)" [(set_attr "type" "store")])