From 8f46e8a70e1b15a96027f2d0ec4f7c2112ebd99f Mon Sep 17 00:00:00 2001 From: naveenh Date: Wed, 18 Feb 2015 04:40:10 +0000 Subject: * config/aarch64/aarch64.c (*aarch64_load_symref_appropriately): Check whether the destination of SYMBOL_SMALL_TPREL is Pmode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220779 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/config/aarch64/aarch64.c | 4 ++++ 2 files changed, 10 insertions(+) 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; -- cgit v1.2.1