On Tue, May 21, 2019 at 09:48:10AM -0500, Segher Boessenkool wrote: > > +static const char * > > +rs6000_machine_from_flags (void) > > +{ > > + if ((rs6000_isa_flags & (ISA_3_0_MASKS_SERVER & ~ISA_2_7_MASKS_SERVER)) > > != 0) > > + return "power9"; > > + if ((rs6000_isa_flags & (ISA_2_7_MASKS_SERVER & ~ISA_2_6_MASKS_SERVER)) > > != 0) > > + return "power8"; > > + if ((rs6000_isa_flags & (ISA_2_6_MASKS_SERVER & ~ISA_2_5_MASKS_SERVER)) > > != 0) > > + return "power7"; > > + if ((rs6000_isa_flags & (ISA_2_5_MASKS_SERVER & ~ISA_2_4_MASKS)) != 0) > > + return "power6"; > > + if ((rs6000_isa_flags & (ISA_2_4_MASKS & ~ISA_2_1_MASKS)) != 0) > > + return "power5"; > > + if ((rs6000_isa_flags & ISA_2_1_MASKS) != 0) > > + return "power4"; > > + if ((rs6000_isa_flags & OPTION_MASK_POWERPC64) != 0) > > + return "ppc64"; > > + return "ppc"; > > +} > > As you know I'm trying to get rid of most of the separate user-selectable > features we have currently. I think I'll steal this code :-) > > (Is Power5 2.4? Not 2.2?)
Yes, I think power5 was 2.02, but I haven't looked at cpu and arch books to verify exactly what power5 and power5+ was. Note that gas lumps power5 and power5+ in one category so "power5" from rs6000_machine_from_flags means power5+ too. This change was based on the fact that "friz" and other similar instructions enabled by gcc with TARGET_FPRND are enabled in gas by "-mpower5", "-mpwr5", or "-mpwr5x". ("-mpower5+" isn't a valid gas option.) rs6000-cpus.def puts OPTION_MASK_FPRND in ISA_2_4_MASKS, so ISA_2_4_MASKS is the one to use in deciding to pass "-mpower5" to gas. > -mdejagnu-cpu=power7 should make the -mno-* things unnecessary I think? No, it doesn't. The -mno- options are to counter options added by check_vect_support_and_set_flags based on hardware detection. On power8 hardware just switching to -mdejagnu-cpu results in, for example: ...xgcc -B.../ ...gcc.dg/vect/pr4875.c -fno-diagnostics-show-caret \ -fno-diagnostics-show-line-numbers -fdiagnostics-color=never -flto \ -ffat-lto-objects -maltivec -mpower8-vector -ftree-vectorize \ -fno-vect-cost-model -fno-common -O2 -fdump-tree-vect-details \ -O3 -mdejagnu-cpu=power6 -S -o pr48765.s -- Alan Modra Australia Development Lab, IBM