See https://gcc.gnu.org/pipermail/gcc-patches/2025-September/695920.html for more detail about the motavation for this set of patches.
This is the fourth patch out of ten that changes the defines of the various _ARCH_PPC<x> macros that have CPU options to use the CPU options instead of ISA bits. I have bootstraped and ran the regression tests for these patches on both little endian and big endian Power servers. Can I check these patches into the trunk? 2025-09-22 Michael Meissner <[email protected]> gcc/ * config/rs6000/rs6000-c.cc (rs6000_target_modify_macros): Use CPU options to define _ARCH_PWR11, _ARCH_PWR11, _ARCH_PWR10, _ARCH_PWR9, _ARCH_PWR8, _ARCH_PWR7, and _ARCH_PWR6. --- gcc/config/rs6000/rs6000-c.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gcc/config/rs6000/rs6000-c.cc b/gcc/config/rs6000/rs6000-c.cc index 823531d5e5a..d5e1e3c046a 100644 --- a/gcc/config/rs6000/rs6000-c.cc +++ b/gcc/config/rs6000/rs6000-c.cc @@ -428,17 +428,17 @@ rs6000_target_modify_macros (bool define_p, rs6000_define_or_undefine_macro (define_p, "_ARCH_PWR5"); if ((flags & OPTION_MASK_FPRND) != 0) rs6000_define_or_undefine_macro (define_p, "_ARCH_PWR5X"); - if ((flags & OPTION_MASK_CMPB) != 0) + if ((cpu_option & CPU_OPTION_POWER6_MASK) != 0) rs6000_define_or_undefine_macro (define_p, "_ARCH_PWR6"); - if ((flags & OPTION_MASK_POPCNTD) != 0) + if ((cpu_option & CPU_OPTION_POWER7_MASK) != 0) rs6000_define_or_undefine_macro (define_p, "_ARCH_PWR7"); - if ((flags & OPTION_MASK_POWER8) != 0) + if ((cpu_option & CPU_OPTION_POWER8_MASK) != 0) rs6000_define_or_undefine_macro (define_p, "_ARCH_PWR8"); - if ((flags & OPTION_MASK_MODULO) != 0) + if ((cpu_option & CPU_OPTION_POWER9_MASK) != 0) rs6000_define_or_undefine_macro (define_p, "_ARCH_PWR9"); - if ((flags & OPTION_MASK_POWER10) != 0) + if ((cpu_option & CPU_OPTION_POWER10_MASK) != 0) rs6000_define_or_undefine_macro (define_p, "_ARCH_PWR10"); - if ((flags & OPTION_MASK_POWER11) != 0) + if ((cpu_option & CPU_OPTION_POWER11_MASK) != 0) rs6000_define_or_undefine_macro (define_p, "_ARCH_PWR11"); if ((flags & OPTION_MASK_SOFT_FLOAT) != 0) rs6000_define_or_undefine_macro (define_p, "_SOFT_FLOAT"); -- 2.51.0 -- Michael Meissner, IBM PO Box 98, Ayer, Massachusetts, USA, 01432 email: [email protected]
