From: Alan Modra Date: Fri, 6 May 2011 14:21:16 +0000 (+0930) Subject: re PR target/48900 (unnecessary duplicate __tls_get_addr calls) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1fc1b66d4a7668e4a9640edac9c6d6bd5105284d;p=gcc.git re PR target/48900 (unnecessary duplicate __tls_get_addr calls) PR target/48900 * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Use const0_rtx as the arg to the dummy __tls_get_addr libcall. From-SVN: r173488 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5a4c1cdfc99..acd049f4603 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-05-06 Alan Modra + + PR target/48900 + * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Use + const0_rtx as the arg to the dummy __tls_get_addr libcall. + 2011-05-06 Uros Bizjak * config/i386/i386.md (*movdf_internal_nointeger): Apply "*" diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index b756ba36e76..d4851ad4d27 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -6407,10 +6407,11 @@ rs6000_legitimize_tls_address (rtx addr, enum tls_model model) if (model == TLS_MODEL_GLOBAL_DYNAMIC) { - r3 = gen_rtx_REG (Pmode, 3); tga = rs6000_tls_get_addr (); - emit_library_call_value (tga, dest, LCT_CONST, Pmode, 1, r3, Pmode); + emit_library_call_value (tga, dest, LCT_CONST, Pmode, + 1, const0_rtx, Pmode); + r3 = gen_rtx_REG (Pmode, 3); if (DEFAULT_ABI == ABI_AIX && TARGET_64BIT) insn = gen_tls_gd_aix64 (r3, got, addr, tga, const0_rtx); else if (DEFAULT_ABI == ABI_AIX && !TARGET_64BIT) @@ -6427,11 +6428,12 @@ rs6000_legitimize_tls_address (rtx addr, enum tls_model model) } else if (model == TLS_MODEL_LOCAL_DYNAMIC) { - r3 = gen_rtx_REG (Pmode, 3); tga = rs6000_tls_get_addr (); tmp1 = gen_reg_rtx (Pmode); - emit_library_call_value (tga, tmp1, LCT_CONST, Pmode, 1, r3, Pmode); + emit_library_call_value (tga, tmp1, LCT_CONST, Pmode, + 1, const0_rtx, Pmode); + r3 = gen_rtx_REG (Pmode, 3); if (DEFAULT_ABI == ABI_AIX && TARGET_64BIT) insn = gen_tls_ld_aix64 (r3, got, tga, const0_rtx); else if (DEFAULT_ABI == ABI_AIX && !TARGET_64BIT)