[PATCH 08/18] rs6000: Builtin expansion, part 3
Segher Boessenkool
segher@kernel.crashing.org
Wed Nov 3 01:15:21 GMT 2021
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
More information about the Gcc-patches
mailing list