Hi!

On Mon, Jan 16, 2023 at 05:20:56PM +0800, Kewen.Lin wrote:
> on 2023/1/16 16:49, Segher Boessenkool wrote:
> >> +/* { dg-require-effective-target powerpc_p9modulo_ok } */
> > 
> > Please use a saner selector?  If one doesn't exist yet, make a new one?
> > Something that just says "p9", not "modulo".
> 
> The has_arch_pwr9 looks not suitable here as it doesn't check
> the assembler behavior?

?  What assembler behaviour?

> Do you have some instruction in mind
> for being used as the tested instruction mnemonic like modsw?

It should not test *any* instruction?

Ah.  There is no *_ok wanted or needed at all.  You simply are required
to use a new enough binutils to fit your GCC.  During development you
probably want something, but that should not end up in the public trees.
You can always use -mcpu=power9.  If your toolchain is broken that will
throw some pretty obvious errors your way; this is fine.  A user can
always say -mcpu=power9.

The *_ok things should only be used for features that can be disabled
during configuration, or features that we *want* users to be able to
turn off (like FP, VMX, VSX, or HMT or QP float, that kind of thing).
That gives quite enough permutations to test already, we do not need to
create a whole bunch extra for no reason :-)

> Maybe later we can deprecate -mmodulo like we get rid of
> -mdirect-move, then we can rename p9modulo_ok to p9_ok here?  :)

We can (and should!) make that compiler flag a stub, yes.  But currently
it is used in places as a sneaky way to do -mcpu=power9.  So it is a bit
more work :-(


Segher

Reply via email to