On Mon, Nov 12, 2018 at 10:12:13PM +1030, Alan Modra wrote:
> The -mcpu=native support has bit-rotted a little, in particular the
> fallback when the native cpu couldn't be determined.  This patch fixes
> the bit-rot and reorganizes ASM_CPU_SPEC so that it should be a little
> easier to keep the -mcpu=native data up to date.
> 
> The patch also changes the fix for PR63177 (-mpower9-vector being
> passed by the user when the default is -mpower8) to also apply when
> -mcpu=powerpc64le and -mcpu=native is given.  I'll note that the hack
> for PR63177 should probably be extended to lots of other options, if
> we're going to continue supporting all those sub-architecture options
> (-mpower9-vector, -mpower8-vector, -mcrypto, -mdirect-move, -mhtm,
> -mvsx and others) in the positive sense.  I think those should have
> only been supported in their -mno- variants..

Yes.  And some already are disabled (well, -mdirect-move is; having such
a fundamental feature user-selectable is a lot of maintenance work, for
little or no benefit).

Some of the others may make sense to allow disabling, but enabling some
features of a newer ISA when the -mcpu= says to use something older?
What is the use case for that?</rant>

> Bootstrapped etc. powerpc64le-linux.
> 
> Note that there is a small change to the AIX default, with -maltivec
> now selecting -m970 for both with and without -maix64 whereas before
> you got -mppc64 for -maix64.  That seems correct to me, an oversight
> likely due to handling -maix64 default cpu in the wrong place.

Yup.

>       * config/rs6000/aix71.h (ASM_SPEC): Don't select default -maix64
>       cpu here.
>       (ASM_CPU_SPEC): Do so here.  Rewrite using if .. else if .. specs
>       form.  Error on missing -mcpu case.
>       * config/rs6000/driver-rs6000.c (asm_names <_AIX>): Update NULL case.
>       (asm_names <!_AIX>): Add missing cpus.  Update NULL case.  Apply
>       PR63177 fix for -mcpu=power8 and -mcpu=powerpc64le.
>       * config/rs6000/rs6000.h (ASM_CPU_SPEC): Rewrite using if ..
>       else if .. specs form.  Error on missing -mcpu case.  Don't output
>       duplicate -maltivec.  Apply PR63177 fix for -mcpu=powerpc64le.

Okay for trunk.  Thanks!


Segher

Reply via email to