On Wed, Sep 01, 2021 at 11:13:44AM -0500, Bill Schmidt wrote:
>       * config/rs6000/rs6000-call.c (new_cpu_expand_builtin):
>       Implement.

(just one line)

> @@ -14646,6 +14646,108 @@ static rtx
>  new_cpu_expand_builtin (enum rs6000_gen_builtins fcode,
>                       tree exp ATTRIBUTE_UNUSED, rtx target)
>  {
> +  /* __builtin_cpu_init () is a nop, so expand to nothing.  */
> +  if (fcode == RS6000_BIF_CPU_INIT)
> +    return const0_rtx;
> +
> +  if (target == 0 || GET_MODE (target) != SImode)
> +    target = gen_reg_rtx (SImode);
> +
> +#ifdef TARGET_LIBC_PROVIDES_HWCAP_IN_TCB

It would make sense to put this #ifdef in a separate function (it
certainly is big enough for that, that is reason enough ;-) ), and then
you can probably do it without #ifdef more easily as a bonus.  That's a
future improvement of course.

In general, any function that is unwieldily big should have pieces
factored out.  A good time to do that is if you would be touching it
anyway (as a separate patch, before the other stuff most likely).

The patch is okay for trunk (w/ the changelog nit fixed :-) )  Thanks!


Segher

Reply via email to