Hi!

On Wed, May 22, 2019 at 06:39:55PM -0500, Bill Schmidt wrote:
> @@ -26191,6 +26191,10 @@ rs6000_global_entry_point_needed_p (void)
>    if (TARGET_SINGLE_PIC_BASE)
>      return false;
>  
> +  /* PC-relative functions never generate a global entry point prologue.  */
> +  if (rs6000_pcrel_p (cfun))
> +    return false;

"global_entry_point_needed" is such a confusing name; it isn't what this
function is about.  "global entry point prologue" like in your comment
is much closer to the truth, but also not exactly it.

Maybe we should rename this function.  And/or split it into two.

> +  const char *name = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0);

This var is only used on some code paths.  Factor this better, instead?
This ties in with the previous point.

> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/powerpc/localentry-1.c
> @@ -0,0 +1,19 @@
> +/* { dg-do compile } */
> +/* { dg-options "-mcpu=future -O2" } */
> +/* { dg-require-effective-target powerpc_elfv2 } */
> +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { 
> "-mcpu=future" } } */

Lose this last line, use -mdejagnu-cpu=future instead please.


Segher

Reply via email to