From: Andrew Pinski Date: Wed, 18 Feb 2015 04:40:10 +0000 (+0000) Subject: aarch64.c (*aarch64_load_symref_appropriately): Check whether the destination of... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e6f7f0e9511fabd1c30c51764f743389a0005833;p=gcc.git aarch64.c (*aarch64_load_symref_appropriately): Check whether the destination of SYMBOL_SMALL_TPREL is Pmode. * config/aarch64/aarch64.c (*aarch64_load_symref_appropriately): Check whether the destination of SYMBOL_SMALL_TPREL is Pmode. Co-Authored-By: Naveen H.S From-SVN: r220779 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3cbcc159563..2c75df60807 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-02-18 Andrew Pinski + Naveen H.S + + * config/aarch64/aarch64.c (*aarch64_load_symref_appropriately): + Check whether the destination of SYMBOL_SMALL_TPREL is Pmode. + 2015-02-17 Jan Hubicka * ipa-visibility.c (function_and_variable_visibility): Only diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 39921a7ae1e..cba3c1a4d42 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -911,6 +911,10 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm, case SYMBOL_SMALL_TPREL: { rtx tp = aarch64_load_tp (NULL); + + if (GET_MODE (dest) != Pmode) + tp = gen_lowpart (GET_MODE (dest), tp); + emit_insn (gen_tlsle_small (dest, tp, imm)); set_unique_reg_note (get_last_insn (), REG_EQUIV, imm); return;