From e6f7f0e9511fabd1c30c51764f743389a0005833 Mon Sep 17 00:00:00 2001 From: Andrew Pinski Date: Wed, 18 Feb 2015 04:40:10 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 6 ++++++ gcc/config/aarch64/aarch64.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3cbcc15..2c75df6 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 39921a7..cba3c1a 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; -- 2.7.4