From: Andrew Pinski Date: Fri, 27 Feb 2015 09:52:09 +0000 (+0000) Subject: aarch64.c (*aarch64_load_symref_appropriately): Check whether the destination of... X-Git-Tag: releases/gcc-4.9.3~315 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e82a259f1bd3c8fc32a2af51aba924021665b25b;p=thirdparty%2Fgcc.git aarch64.c (*aarch64_load_symref_appropriately): Check whether the destination of SYMBOL_SMALL_TPREL is Pmode. 2015-02-27 Andrew Pinski Naveen H.S * 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: r221045 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e181fa48bfdb..ee7f3c8f8061 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-02-27 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-27 Richard Biener PR lto/65193 diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 3adf54e5b8a8..408d8cb7797a 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -659,6 +659,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;