I decided to see if it was possible to simplify the change over by adding another flag word in the .opt handling to give the old names (TARGET_ and MASK_). For Joseph Myers and Neil Booth, the issue is when changing all of the switches that use Mask(xxx) and InverseMask(xxx) to also use Var(xxx), the option machinery changes the names of the macros to OPTION_ and OPTION_MASK_, which in turn causes lots and lots of changes for patch review. Some can't be omitted, where we referred to the 'target_flags' and 'target_flags_explicit' fields, but at least it reduces the number of other changes. Before doing these patches, I experimented with automatically changing target_flags to HOST_WIDE_INT if we had more than 31 switches, but when I defined a few extra switches to push the powerpc over the limit, I couldn't get the compiler to bootstrap. I figure there were some 'int' variables that need to be changed to the type I created, but I wasn't able to find it. So, I added a TargetName flag to the options. If TargetName is used, the options machinery generates the old names. I have bootstrapped and run the compiler test suite without regressions. If the option handling maintainers agree this is worthwhile, I would like to check it in (or iterate to fix any issues). If it is not acceptible, I will do by changing all of the names, as I've done in previous iterations of this patch. I'm including two attachments. The first (363c) is the changes to the machine independent files, and the second (363d) are the changes to the rs6000 files. 2012-10-12 Michael Meissner * opt-functions.awk (var_set): Move selection of TARGET_ vs. OPTION_ prefix to the opt_prefix_target function. Move selection of MASK_ vs. OPTION_MASK_ prefix to opt_prefix_mask function. If the TargetName flag was set, generate TARGET_ and MASK_ prefixes for Mask/InverseMask options that use a secondary flags variable. (opt_prefix_target): Likewise. (opt_prefix_mask): Likewise. * opth-gen.awk (creation of TARGET_/OPTION_ macros): Likewise. (creation of MASK_/OPTION_MASK_ macros): Likewise. * doc/options.texi (Mask): Add documentation for TargetName which allows the user to use Mask/InverseMask along with Var, and generate the traditional TARGET_ and MASK_ values instead of OPTION_ and OPTION_MASK_. (InverseMask): Likewise. (TargetName): Likewise. * config/rs6000/rs6000.opt (rs6000_flags): New HOST_WIDE_INT flag word to replace target_flags and give us 63 ISA options. (x_rs6000_flags): Location to save/restore rs6000_flags. (x_rs6000_flags_explicit): Location to save/restore rs6000_flags_explicit. (rs6000_taret_flags_explicit): Rename to x_rs6000_flags_explicit. (-mpowerpc64): Change all Mask switches to use rs6000_flags. (-mpowerpc-gpopt): Likewise. (-mpowerpc-gfxopt): Likewise. (-mmfcrf): Likewise. (-mpopcntb): Likewise. (-mfprnd): Likewise. (-mcmpb): Likewise. (-mmfpgpr): Likewise. (-maltivec): Likewise. (-mhard-dfp): Likewise. (-mmulhw): Likewise. (-mdlmzb): Likewise. (-mmultiple): Likewise. (-mstring): Likewise. (-msoft-float): Likewise. (-mhard-float): Likewise. (-mpopcntd): Likewise. (-mvsx): Likewise. (-mno-update): Likewise. (-mupdate): Likewise. (-mminimal-toc): Likewise. (-misel): Likewise. * config/rs6000/darwin.opt (-m64): Likewise. (-m32): Likewise. * config/rs6000/aix64.opt (-m64): Likewise. (-m32): Likewise. * config/rs6000/sysv4.opt (-mstrict-align): Likewise. (-mrelocatable): Likewise. (-mlittle-endian): Likewise. (-mlittle): Likewise. (-mbig-endian): Likewise. (-mbig): Likewise. (-meabi): Likewise. (-m64): Likewise. (-m32): Likewise. * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change all uses of target_flags to rs6000_flags, and target_flags_explicit. Update saving/restoring/printing these flags values. (darwin_rs6000_override_options): Likewise. (rs6000_option_override_internal): Likewise. (rs6000_darwin_file_start): Likewise. (rs6000_inner_target_options): Likewise. (rs6000_pragma_target_parse): Likewise. (rs6000_set_current_function): Likewise. (rs6000_function_specific_save): Likewise. (rs6000_function_specific_restore): Likewise. (rs6000_function_specific_print): Likewise. (rs6000_can_inline_p): Likewise. * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Likewise. * config/rs6000/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Likewise. * config/rs6000/aix51.h (SUBTARGET_OVERRIDE_OPTIONS): Likewise. * config/rs6000/aix52.h (SUBTARGET_OVERRIDE_OPTIONS): Likewise. * config/rs6000/aix53.h (SUBTARGET_OVERRIDE_OPTIONS): Likewise. * config/rs6000/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Likewise. * config/rs6000/freebsd.h (RELOCATABLE_NEEDS_FIXUP): Likewise. * config/rs6000/freebsd64.h (RELOCATABLE_NEEDS_FIXUP): Likewise. (SUBSUBTARGET_OVERRIDE_OPTIONS): Likewise. * config/rs6000/linux.h (RELOCATABLE_NEEDS_FIXUP): Likewise. * config/rs6000/linux64.h (RELOCATABLE_NEEDS_FIXUP): Likewise. (SUBSUBTARGET_OVERRIDE_OPTIONS): Likewise. * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Likewise. (rs6000_cpu_cpp_builtins): Likewise. * config/rs6000/rs6000.h: Change comments refering to target_flags. * config/rs6000/sysv4.h (TARGET_TOC): Likewise. (SUBTARGET_OVERRIDE_OPTIONS): Likewise. (SUBSUBTARGET_OVERRIDE_OPTIONS): Likewise. (TARGET_OS_SYSV_CPP_BUILTINS): Likewise. * config/rs6000/rs6000-opts.h (rs6000_flags_explicit): Define in terms of global_options_set.x_rs6000_flags. -- Michael Meissner, IBM 5 Technology Place Drive, M/S 2757, Westford, MA 01886-3141, USA meissner@linux.vnet.ibm.com fax +1 (978) 399-6899