This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, AArch64] [4.9] Handle SYMBOL_SMALL_TPREL appropriately
- From: Richard Earnshaw <Richard dot Earnshaw at foss dot arm dot com>
- To: "Hurugalawadi, Naveen" <Naveen dot Hurugalawadi at caviumnetworks dot com>, Marcus Shawcroft <marcus dot shawcroft at gmail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "Pinski, Andrew" <Andrew dot Pinski at caviumnetworks dot com>
- Date: Fri, 27 Feb 2015 09:44:10 +0000
- Subject: Re: [PATCH, AArch64] [4.9] Handle SYMBOL_SMALL_TPREL appropriately
- Authentication-results: sourceware.org; auth=none
- References: <1422852769059 dot 53654 at caviumnetworks dot com> <CAFqB+PwjbUBBtpvOKkpX8dC8vv-+1Bh2zJgAXaTxJO0mY0Etew at mail dot gmail dot com> <1424234802513 dot 423 at caviumnetworks dot com>,<CAFqB+PyLz2QeP2_HNqgvzuZE63UwXR+akfUG6oGh-2PhMUq0xw at mail dot gmail dot com> <1424405747482 dot 38519 at caviumnetworks dot com>
On 20/02/15 04:14, Hurugalawadi, Naveen wrote:
> Hi Marcus,
>
>>> The handling of SYMBOL_SMALL_TPREL is present in 4.9 and very clearly
>>> has exactly the same issue.
>
> Please find attached the patch ported for gcc-4.9.
>
> Please review the patch and let us know if its okay?
> Regression tested on aarch64-elf.
>
> Thanks,
> Naveen
>
>
> 2015-02-20 Andrew Pinski <apinski@cavium.com>
> Naveen H.S <Naveen.Hurugalawadi@caviumnetworks.com>
>
> * config/aarch64/aarch64.c (*aarch64_load_symref_appropriately):
> Check whether the destination of SYMBOL_SMALL_TPREL is Pmode.
>
OK.
R.
>
> symbolref_ilp32.patch
>
>
> Index: gcc/config/aarch64/aarch64.c
> ===================================================================
> --- gcc/config/aarch64/aarch64.c (revision 220806)
> +++ gcc/config/aarch64/aarch64.c (working copy)
> @@ -659,6 +659,10 @@
> 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;
>