From patchwork Tue Dec 11 18:37:36 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [SPARC] Fix PR target/54121 From: Eric Botcazou X-Patchwork-Id: 205292 Message-Id: <4617091.BFNxLO7VlM@polaris> To: gcc-patches@gcc.gnu.org Date: Tue, 11 Dec 2012 19:37:36 +0100 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")])