Hi Segher! on 2023/1/16 18:40, Segher Boessenkool wrote: > 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?
I should have said assembler "support", selector powerpc_p9modulo_ok checks if assembler supports some insn or not, but has_arch_pwr9 doesn't. > >> 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 :-) Thanks for the explanation!! I meant to use powerpc_p9modulo_ok to exclude those cases where we can't use -mcpu=power9, as you explained we should not worry about it!? Since the test point requires altivec support (which is implied when specifying -mcpu=power9, I didn't explicitly specify it before), I think I could use powerpc_altivec_ok to replace powerpc_p9modulo_ok here, does it sound good to you? BR, Kewen