From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103804 invoked by alias); 28 Oct 2015 11:01:22 -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 103790 invoked by uid 89); 28 Oct 2015 11:01:22 -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_20,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: cam-smtp0.cambridge.arm.com Received: from fw-tnat.cambridge.arm.com (HELO cam-smtp0.cambridge.arm.com) (217.140.96.140) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 28 Oct 2015 11:01:21 +0000 Received: from arm.com (e107456-lin.cambridge.arm.com [10.2.206.78]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id t9SB1FVF026329; Wed, 28 Oct 2015 11:01:15 GMT Date: Wed, 28 Oct 2015 11:01:00 -0000 From: James Greenhalgh To: Ramana Radhakrishnan Cc: Jeff Law , "H.J. Lu" , Jiong Wang , Bernd Schmidt , GCC Patches , Marcus Shawcroft Subject: Re: PING: [PATCH] PR target/67215: -fno-plt needs improvements for x86 Message-ID: <20151028110114.GA13365@arm.com> References: <562F5E11.1090503@redhat.com> <562F739F.2090000@foss.arm.com> <562F818A.90003@foss.arm.com> <562F8B6F.7060605@foss.arm.com> <562F9B4C.8000607@foss.arm.com> <562FE52C.6050803@redhat.com> <56309FB3.2090207@foss.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56309FB3.2090207@foss.arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg03017.txt.bz2 On Wed, Oct 28, 2015 at 10:13:07AM +0000, Ramana Radhakrishnan wrote: > > > On 27/10/15 20:57, Jeff Law wrote: > >> a > >> > >> * config/aarch64/aarch64.md (call, call_value): Handle noplt. > > FWIW -ENOPATCH. > > > > jeff > > > Bah - finger trouble. Sorry about that. Here it is and also handling sibcall > patterns. Tested aarch64-none-elf with no regressions. I think there is a small arithmetic simplification possible here... > 2015-10-28 Ramana Radhakrishnan > > * config/aarch64/aarch64.md (call_value, call, sibcall_value, > sibcall): Handle noplt. > diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md > index baa97fd..1bc6237 100644 > --- a/gcc/config/aarch64/aarch64.md > +++ b/gcc/config/aarch64/aarch64.md > @@ -696,7 +696,8 @@ > the branch-and-link. */ > callee = XEXP (operands[0], 0); > if (GET_CODE (callee) == SYMBOL_REF > - ? aarch64_is_long_call_p (callee) > + ? (aarch64_is_long_call_p (callee) > + || aarch64_is_noplt_call_p (callee)) > : !REG_P (callee)) > XEXP (operands[0], 0) = force_reg (Pmode, callee); > > @@ -755,7 +756,8 @@ > the branch-and-link. */ > callee = XEXP (operands[1], 0); > if (GET_CODE (callee) == SYMBOL_REF > - ? aarch64_is_long_call_p (callee) > + ? (aarch64_is_long_call_p (callee) > + || aarch64_is_noplt_call_p (callee)) > : !REG_P (callee)) > XEXP (operands[1], 0) = force_reg (Pmode, callee); > These hunks are fine. > @@ -805,10 +807,12 @@ > "" > { > rtx pat; > - > - if (!REG_P (XEXP (operands[0], 0)) > - && (GET_CODE (XEXP (operands[0], 0)) != SYMBOL_REF)) > - XEXP (operands[0], 0) = force_reg (Pmode, XEXP (operands[0], 0)); > + rtx callee = XEXP (operands[0], 0); > + if (!REG_P (callee) > + && ((GET_CODE (callee) != SYMBOL_REF) > + || (GET_CODE (callee) == SYMBOL_REF > + && aarch64_is_noplt_call_p (callee)))) if (!REG_P (callee) && ((GET_CODE (callee) != SYMBOL_REF) || && aarch64_is_noplt_call_p (callee))) ??? > @@ -835,10 +839,12 @@ > "" > { > rtx pat; > - > - if (!REG_P (XEXP (operands[1], 0)) > - && (GET_CODE (XEXP (operands[1], 0)) != SYMBOL_REF)) > - XEXP (operands[1], 0) = force_reg (Pmode, XEXP (operands[1], 0)); > + rtx callee = XEXP (operands[1], 0); > + if (!REG_P (callee) > + && ((GET_CODE (callee) != SYMBOL_REF) > + || (GET_CODE (callee) == SYMBOL_REF > + && aarch64_is_noplt_call_p (callee)))) > + XEXP (operands[1], 0) = force_reg (Pmode, callee); Likewise. Thanks, James