From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 56818 invoked by alias); 27 Feb 2015 09:44:15 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 56791 invoked by uid 89); 27 Feb 2015 09:44:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 27 Feb 2015 09:44:14 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 41183FD; Fri, 27 Feb 2015 01:44:28 -0800 (PST) Received: from e105689-lin.cambridge.arm.com (e105689-lin.cambridge.arm.com [10.2.207.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E6FBE3F2E6; Fri, 27 Feb 2015 01:44:11 -0800 (PST) Message-ID: <54F03C6A.6020805@foss.arm.com> Date: Fri, 27 Feb 2015 10:18:00 -0000 From: Richard Earnshaw User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: "Hurugalawadi, Naveen" , Marcus Shawcroft CC: "gcc-patches@gcc.gnu.org" , "Pinski, Andrew" Subject: Re: [PATCH, AArch64] [4.9] Handle SYMBOL_SMALL_TPREL appropriately References: <1422852769059.53654@caviumnetworks.com> <1424234802513.423@caviumnetworks.com>, <1424405747482.38519@caviumnetworks.com> In-Reply-To: <1424405747482.38519@caviumnetworks.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg01690.txt.bz2 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 > Naveen H.S > > * 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; >