Hi Segher, on 2023/1/16 23:24, Segher Boessenkool wrote: > On Mon, Jan 16, 2023 at 09:05:38PM +0800, Kewen.Lin wrote: >>> 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!? > > But that selector says whether modulo insns are enabled. This is not > correct to use here. I know we have abused these things before, but it > needs to be untangled, not made worse :-)
Makes sense, thanks for further clarifying! > >> 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? > > VMX can be turned off even with -mcpu=power9. So yes, it does need > powerpc_altivec_ok. Does it need VSX even? I think we don't need to check VSX here. Checking VMX is for robustness and ensure it's consistent with the comment: /* Allow -maltivec -mabi=no-altivec without warning. Altivec vector modes only exist for GCC vector types if -maltivec. */ if (TARGET_32BIT && !TARGET_ALTIVEC_ABI && ALTIVEC_VECTOR_MODE (arg.mode)) { if (TARGET_DEBUG_ARG) fprintf (stderr, "function_arg_pass_by_reference: AltiVec\n"); return 1; } BR, Kewen