PING: [PATCH] PR target/67215: -fno-plt needs improvements for x86

James Greenhalgh james.greenhalgh@arm.com
Wed Oct 28 11:01:00 GMT 2015


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  <ramana.radhakrishnan@arm.com>
> 
>         * 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



More information about the Gcc-patches mailing list