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_<xxx> and
MASK_<xxx>).  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_<xxx> and
OPTION_MASK_<xxx>, 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  <meiss...@linux.vnet.ibm.com>

        * 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_<xxx>/OPTION_<xxx> macros):
        Likewise.
        (creation of MASK_<xxx>/OPTION_MASK_<xxx> 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_<xxx> and MASK_<xxx> values
        instead of OPTION_<xxx> and OPTION_MASK_<xxx>.
        (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
meiss...@linux.vnet.ibm.com     fax +1 (978) 399-6899
Index: gcc/opth-gen.awk
===================================================================
--- gcc/opth-gen.awk    (revision 192400)
+++ gcc/opth-gen.awk    (working copy)
@@ -332,10 +332,9 @@ for (i = 0; i < n_opts; i++) {
        if (name != "" && mask_bits[name] == 0) {
                mask_bits[name] = 1
                vname = var_name(flags[i])
-               mask = "MASK_"
+               mask = opt_prefix_mask(flags[i])
                mask_1 = "1"
                if (vname != "") {
-                       mask = "OPTION_MASK_"
                        if (host_wide_int[vname] == "yes")
                                mask_1 = "HOST_WIDE_INT_1"
                } else
@@ -375,14 +374,13 @@ for (i = 0; i < n_opts; i++) {
        if (name != "" && mask_macros[name] == 0) {
                mask_macros[name] = 1
                vname = var_name(flags[i])
-               macro = "OPTION_"
-               mask = "OPTION_MASK_"
+               macro = opt_prefix_target(name)
+               mask = opt_prefix_mask(name)
                if (vname == "") {
                        vname = "target_flags"
-                       macro = "TARGET_"
-                       mask = "MASK_"
                        extra_mask_macros[name] = 1
                }
+
                print "#define " macro name \
                      " ((" vname " & " mask name ") != 0)"
        }
@@ -398,13 +396,12 @@ for (i = 0; i < n_opts; i++) {
        opt = opt_args("InverseMask", flags[i])
        if (opt ~ ",") {
                vname = var_name(flags[i])
-               macro = "OPTION_"
-               mask = "OPTION_MASK_"
+               macro = opt_prefix_target(flags[i])
+               mask = opt_prefix_mask(flags[i])
                if (vname == "") {
                        vname = "target_flags"
-                       macro = "TARGET_"
-                       mask = "MASK_"
                }
+
                print "#define " macro nth_arg(1, opt) \
                      " ((" vname " & " mask nth_arg(0, opt) ") == 0)"
        }
Index: gcc/opt-functions.awk
===================================================================
--- gcc/opt-functions.awk       (revision 192400)
+++ gcc/opt-functions.awk       (working copy)
@@ -242,18 +242,14 @@ function var_set(flags)
        s = opt_args("Mask", flags);
        if (s != "") {
                vn = var_name(flags);
-               if (vn)
-                       return "0, CLVC_BIT_SET, OPTION_MASK_" s
-               else
-                       return "0, CLVC_BIT_SET, MASK_" s
+               mask = opt_prefix_mask(flags)
+               return "0, CLVC_BIT_SET, " mask s
        }
        s = nth_arg(0, opt_args("InverseMask", flags));
        if (s != "") {
                vn = var_name(flags);
-               if (vn)
-                       return "0, CLVC_BIT_CLEAR, OPTION_MASK_" s
-               else
-                       return "0, CLVC_BIT_CLEAR, MASK_" s
+               mask = opt_prefix_mask(flags)
+               return "0, CLVC_BIT_CLEAR, " mask s
        }
        if (flag_set_p("Enum.*", flags)) {
                en = opt_args("Enum", flags);
@@ -297,3 +293,25 @@ function lang_sanitized_name(name)
     gsub( "[^" alnum "_]", "X", name )
     return name
 }
+
+# Given the option called NAME which is a mask argument, return the prefix for
+# the option (i.e. TARGET_ or OPTION_).
+function opt_prefix_target(name)
+{
+       variable = var_name(name)
+       if (variable == "" || flag_set_p("TargetName", name))
+               return "TARGET_";
+       else
+               return "OPTION_";
+}
+
+# Given the option called NAME which is a mask argument, return the prefix for
+# the mask name (i.e. MASK_ or OPTION_MASK_).
+function opt_prefix_mask(name)
+{
+       variable = var_name(name)
+       if (variable == "" || flag_set_p("TargetName", name))
+               return "MASK_";
+       else
+               return "OPTION_MASK_";
+}
Index: gcc/doc/options.texi
===================================================================
--- gcc/doc/options.texi        (revision 192400)
+++ gcc/doc/options.texi        (working copy)
@@ -339,12 +339,14 @@ You may also specify @code{Var} to selec
 @code{target_flags}.
 
 The options-processing script will automatically allocate a unique bit
-for the option.  If the option is attached to @samp{target_flags},
-the script will set the macro @code{MASK_@var{name}} to the appropriate
-bitmask.  It will also declare a @code{TARGET_@var{name}} macro that has
-the value 1 when the option is active and 0 otherwise.  If you use @code{Var}
-to attach the option to a different variable, the associated macros are
-called @code{OPTION_MASK_@var{name}} and @code{OPTION_@var{name}} respectively.
+for the option.  If the option is attached to @samp{target_flags}, the
+script will set the macro @code{MASK_@var{name}} to the appropriate
+bitmask.  It will also declare a @code{TARGET_@var{name}} macro that
+has the value 1 when the option is active and 0 otherwise.  If you use
+@code{Var} to attach the option to a different variable and do not
+used the @code{TargetName} opiton, the associated macros are called
+@code{OPTION_MASK_@var{name}} and @code{OPTION_@var{name}}
+respectively.
 
 @item InverseMask(@var{othername})
 @itemx InverseMask(@var{othername}, @var{thisname})
@@ -472,4 +474,10 @@ format}.
 @item NoDWARFRecord
 The option is omitted from the producer string written by
 @option{-grecord-gcc-switches}.
+
+@item TargetName
+If the option was declared with @code{Mask} or @code{InverseMask} and
+also @code{Var} to specify an alternative flag word, the
+@code{TARGET_@var{name}} and @code{MASK_@var{name}} macros will be
+created of @code{OPTION_@var{name}} and @code{OPTION_MASK_@var{name}}.
 @end table
Index: gcc/config/rs6000/rs6000.opt
===================================================================
--- gcc/config/rs6000/rs6000.opt        (revision 192400)
+++ gcc/config/rs6000/rs6000.opt        (working copy)
@@ -86,80 +86,88 @@ HOST_WIDE_INT rs6000_builtin_mask
 TargetVariable
 unsigned int rs6000_debug
 
-;; Save for target_flags_explicit
+;; Replacement for target_flags that gives us more options.
+Variable
+HOST_WIDE_INT rs6000_flags = TARGET_DEFAULT
+
+;; Save for rs6000_flags
+TargetSave
+HOST_WIDE_INT x_rs6000_flags
+
+;; Save for rs6000_flags_explicit
 TargetSave
-int rs6000_target_flags_explicit
+HOST_WIDE_INT x_rs6000_flags_explicit
 
 ;; This option existed in the past, but now is always on.
 mpowerpc
 Target RejectNegative Undocumented Ignore
 
 mpowerpc64
-Target Report Mask(POWERPC64)
+Target Report Mask(POWERPC64) TargetName Var(rs6000_flags)
 Use PowerPC-64 instruction set
 
 mpowerpc-gpopt
-Target Report Mask(PPC_GPOPT) Save
+Target Report Mask(PPC_GPOPT) TargetName Var(rs6000_flags)
 Use PowerPC General Purpose group optional instructions
 
 mpowerpc-gfxopt
-Target Report Mask(PPC_GFXOPT) Save
+Target Report Mask(PPC_GFXOPT) TargetName Var(rs6000_flags)
 Use PowerPC Graphics group optional instructions
 
 mmfcrf
-Target Report Mask(MFCRF) Save
+Target Report Mask(MFCRF) TargetName Var(rs6000_flags)
 Use PowerPC V2.01 single field mfcr instruction
 
 mpopcntb
-Target Report Mask(POPCNTB) Save
+Target Report Mask(POPCNTB) TargetName Var(rs6000_flags)
 Use PowerPC V2.02 popcntb instruction
 
 mfprnd
-Target Report Mask(FPRND) Save
+Target Report Mask(FPRND) TargetName Var(rs6000_flags)
 Use PowerPC V2.02 floating point rounding instructions
 
 mcmpb
-Target Report Mask(CMPB) Save
+Target Report Mask(CMPB) TargetName Var(rs6000_flags)
 Use PowerPC V2.05 compare bytes instruction
 
 mmfpgpr
-Target Report Mask(MFPGPR) Save
+Target Report Mask(MFPGPR) TargetName Var(rs6000_flags)
 Use extended PowerPC V2.05 move floating point to/from GPR instructions
 
 maltivec
-Target Report Mask(ALTIVEC) Save
+Target Report Mask(ALTIVEC) TargetName Var(rs6000_flags)
 Use AltiVec instructions
 
 mhard-dfp
-Target Report Mask(DFP) Save
+Target Report Mask(DFP) TargetName Var(rs6000_flags)
 Use decimal floating point instructions
 
 mmulhw
-Target Report Mask(MULHW) Save
+Target Report Mask(MULHW) TargetName Var(rs6000_flags)
 Use 4xx half-word multiply instructions
 
 mdlmzb
-Target Report Mask(DLMZB) Save
+Target Report Mask(DLMZB) TargetName Var(rs6000_flags)
 Use 4xx string-search dlmzb instruction
 
 mmultiple
-Target Report Mask(MULTIPLE) Save
+Target Report Mask(MULTIPLE) TargetName Var(rs6000_flags)
 Generate load/store multiple instructions
 
 mstring
-Target Report Mask(STRING) Save
+Target Report Mask(STRING) TargetName Var(rs6000_flags)
 Generate string instructions for block moves
 
 msoft-float
-Target Report RejectNegative Mask(SOFT_FLOAT)
+Target Report RejectNegative Mask(SOFT_FLOAT) TargetName Var(rs6000_flags)
 Do not use hardware floating point
 
 mhard-float
-Target Report RejectNegative InverseMask(SOFT_FLOAT, HARD_FLOAT)
+Target Report RejectNegative InverseMask(SOFT_FLOAT, HARD_FLOAT) TargetName 
Var(rs6000_flags)
 Use hardware floating point
 
 mpopcntd
-Target Report Mask(POPCNTD) Save
+Target Report Mask(POPCNTD) TargetName Var(rs6000_flags)
 Use PowerPC V2.06 popcntd instruction
 
 mfriz
@@ -171,7 +179,7 @@ Target RejectNegative Joined Var(rs6000_
 Vector library ABI to use
 
 mvsx
-Target Report Mask(VSX) Save
+Target Report Mask(VSX) TargetName Var(rs6000_flags)
 Use vector/scalar (VSX) instructions
 
 mvsx-scalar-double
@@ -211,11 +219,11 @@ Target Undocumented Report Var(TARGET_VE
 ; Explicitly control whether we vectorize the builtins or not.
 
 mno-update
-Target Report RejectNegative Mask(NO_UPDATE) Save
+Target Report RejectNegative Mask(NO_UPDATE) TargetName Var(rs6000_flags)
 Do not generate load/store with update instructions
 
 mupdate
-Target Report RejectNegative InverseMask(NO_UPDATE, UPDATE)
+Target Report RejectNegative InverseMask(NO_UPDATE, UPDATE) TargetName 
Var(rs6000_flags)
 Generate load/store with update instructions
 
 msingle-pic-base
@@ -258,7 +266,7 @@ Target Report RejectNegative Joined Var(
 Generate software reciprocal divide and square root for better throughput.
 
 mrecip-precision
-Target Report Mask(RECIP_PRECISION) Save
+Target Report Mask(RECIP_PRECISION) TargetName Var(rs6000_flags)
 Assume that the reciprocal estimate instructions provide more accuracy.
 
 mno-fp-in-toc
@@ -285,7 +293,7 @@ Place symbol+offset constants in TOC
 ;   This is at the cost of having 2 extra loads and one extra store per
 ;   function, and one less allocable register.
 mminimal-toc
-Target Report Mask(MINIMAL_TOC)
+Target Report Mask(MINIMAL_TOC) TargetName Var(rs6000_flags)
 Use only one TOC entry per procedure
 
 mfull-toc
@@ -309,7 +317,7 @@ Target Report Var(rs6000_block_move_inli
 Specify how many bytes should be moved inline before calling out to 
memcpy/memmove
 
 misel
-Target Report Mask(ISEL) Save
+Target Report Mask(ISEL) TargetName Var(rs6000_flags)
 Generate isel instructions
 
 misel=no
Index: gcc/config/rs6000/darwin.opt
===================================================================
--- gcc/config/rs6000/darwin.opt        (revision 192400)
+++ gcc/config/rs6000/darwin.opt        (working copy)
@@ -34,9 +34,9 @@ findirect-data
 Driver RejectNegative Alias(mfix-and-continue)
 
 m64
-Target RejectNegative Negative(m32) Mask(64BIT)
+Target RejectNegative Negative(m32) Mask(64BIT) TargetName Var(rs6000_flags)
 Generate 64-bit code
 
 m32
-Target RejectNegative Negative(m64) InverseMask(64BIT)
+Target RejectNegative Negative(m64) InverseMask(64BIT) TargetName 
Var(rs6000_flags)
 Generate 32-bit code
Index: gcc/config/rs6000/aix64.opt
===================================================================
--- gcc/config/rs6000/aix64.opt (revision 192400)
+++ gcc/config/rs6000/aix64.opt (working copy)
@@ -20,11 +20,11 @@
 ; <http://www.gnu.org/licenses/>.
 
 maix64
-Target Report RejectNegative Negative(maix32) Mask(64BIT)
+Target Report RejectNegative Negative(maix32) Mask(64BIT) TargetName 
Var(rs6000_flags)
 Compile for 64-bit pointers
 
 maix32
-Target Report RejectNegative Negative(maix64) InverseMask(64BIT)
+Target Report RejectNegative Negative(maix64) InverseMask(64BIT) TargetName 
Var(rs6000_flags)
 Compile for 32-bit pointers
 
 mpe
Index: gcc/config/rs6000/sysv4.opt
===================================================================
--- gcc/config/rs6000/sysv4.opt (revision 192400)
+++ gcc/config/rs6000/sysv4.opt (working copy)
@@ -49,12 +49,12 @@ Target Report Var(TARGET_NO_BITFIELD_TYP
 Align to the base type of the bit-field
 
 mstrict-align
-Target Report Mask(STRICT_ALIGN)
+Target Report Mask(STRICT_ALIGN) TargetName Var(rs6000_flags)
 Align to the base type of the bit-field
 Don't assume that unaligned accesses are handled by the system
 
 mrelocatable
-Target Report Mask(RELOCATABLE)
+Target Report Mask(RELOCATABLE) TargetName Var(rs6000_flags)
 Produce code relocatable at runtime
 
 mrelocatable-lib
@@ -62,19 +62,19 @@ Target
 Produce code relocatable at runtime
 
 mlittle-endian
-Target Report RejectNegative Mask(LITTLE_ENDIAN)
+Target Report RejectNegative Mask(LITTLE_ENDIAN) TargetName Var(rs6000_flags)
 Produce little endian code
 
 mlittle
-Target Report RejectNegative Mask(LITTLE_ENDIAN)
+Target Report RejectNegative Mask(LITTLE_ENDIAN) TargetName Var(rs6000_flags)
 Produce little endian code
 
 mbig-endian
-Target Report RejectNegative InverseMask(LITTLE_ENDIAN)
+Target Report RejectNegative InverseMask(LITTLE_ENDIAN) TargetName 
Var(rs6000_flags)
 Produce big endian code
 
 mbig
-Target Report RejectNegative InverseMask(LITTLE_ENDIAN)
+Target Report RejectNegative InverseMask(LITTLE_ENDIAN) TargetName 
Var(rs6000_flags)
 Produce big endian code
 
 ;; FIXME: This does nothing.  What should be done?
@@ -96,7 +96,7 @@ Target RejectNegative
 no description yet
 
 meabi
-Target Report Mask(EABI)
+Target Report Mask(EABI) TargetName Var(rs6000_flags)
 Use EABI
 
 mbit-word
@@ -138,11 +138,11 @@ Target RejectNegative
 no description yet
 
 m64
-Target Report RejectNegative Negative(m32) Mask(64BIT)
+Target Report RejectNegative Negative(m32) Mask(64BIT) TargetName 
Var(rs6000_flags)
 Generate 64-bit code
 
 m32
-Target Report RejectNegative Negative(m64) InverseMask(64BIT)
+Target Report RejectNegative Negative(m64) InverseMask(64BIT) TargetName 
Var(rs6000_flags)
 Generate 32-bit code
 
 mnewlib
Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c  (revision 192400)
+++ gcc/config/rs6000/rs6000.c  (working copy)
@@ -1845,10 +1845,10 @@ rs6000_debug_reg_global (void)
     fprintf (stderr, DEBUG_FMT_S, "tune", "<none>");
 
   cl_target_option_save (&cl_opts, &global_options);
-  rs6000_print_isa_options (stderr, 0, "target_flags", target_flags);
+  rs6000_print_isa_options (stderr, 0, "rs6000_flags", rs6000_flags);
 
-  rs6000_print_isa_options (stderr, 0, "target_flags_explicit",
-                           target_flags_explicit);
+  rs6000_print_isa_options (stderr, 0, "rs6000_flags_explicit",
+                           rs6000_flags_explicit);
 
   rs6000_print_builtin_options (stderr, 0, "rs6000_builtin_mask",
                                rs6000_builtin_mask);
@@ -2357,21 +2357,21 @@ darwin_rs6000_override_options (void)
 
   if (TARGET_64BIT && ! TARGET_POWERPC64)
     {
-      target_flags |= MASK_POWERPC64;
+      rs6000_flags |= MASK_POWERPC64;
       warning (0, "-m64 requires PowerPC64 architecture, enabling");
     }
   if (flag_mkernel)
     {
       rs6000_default_long_calls = 1;
-      target_flags |= MASK_SOFT_FLOAT;
+      rs6000_flags |= MASK_SOFT_FLOAT;
     }
 
   /* Make -m64 imply -maltivec.  Darwin's 64-bit ABI includes
      Altivec.  */
   if (!flag_mkernel && !flag_apple_kext
       && TARGET_64BIT
-      && ! (target_flags_explicit & MASK_ALTIVEC))
-    target_flags |= MASK_ALTIVEC;
+      && ! (rs6000_flags_explicit & MASK_ALTIVEC))
+    rs6000_flags |= MASK_ALTIVEC;
 
   /* Unless the user (not the configurer) has explicitly overridden
      it with -mcpu=G3 or -mno-altivec, then 10.5+ targets default to
@@ -2379,10 +2379,10 @@ darwin_rs6000_override_options (void)
   if (!flag_mkernel
       && !flag_apple_kext
       && strverscmp (darwin_macosx_version_min, "10.5") >= 0
-      && ! (target_flags_explicit & MASK_ALTIVEC)
+      && ! (rs6000_flags_explicit & MASK_ALTIVEC)
       && ! global_options_set.x_rs6000_cpu_index)
     {
-      target_flags |= MASK_ALTIVEC;
+      rs6000_flags |= MASK_ALTIVEC;
     }
 }
 #endif
@@ -2395,9 +2395,9 @@ darwin_rs6000_override_options (void)
 #endif
 
 /* Return the builtin mask of the various options used that could affect which
-   builtins were used.  In the past we used target_flags, but we've run out of
+   builtins were used.  In the past we used rs6000_flags, but we've run out of
    bits, and some options like SPE and PAIRED are no longer in
-   target_flags.  */
+   rs6000_flags.  */
 
 HOST_WIDE_INT
 rs6000_builtin_mask_calculate (void)
@@ -2474,7 +2474,7 @@ rs6000_option_override_internal (bool gl
 #endif
 
   /* Don't override by the processor default if given explicitly.  */
-  set_masks &= ~target_flags_explicit;
+  set_masks &= ~rs6000_flags_explicit;
 
   /* Process the -mcpu=<xxx> and -mtune=<xxx> argument.  If the user changed
      the cpu in a target attribute or pragma, but did not specify a tuning
@@ -2512,13 +2512,13 @@ rs6000_option_override_internal (bool gl
      TARGET_DEFAULT.  */
   if (have_cpu)
     {
-      target_flags &= ~set_masks;
-      target_flags |= (processor_target_table[cpu_index].target_enable
+      rs6000_flags &= ~set_masks;
+      rs6000_flags |= (processor_target_table[cpu_index].target_enable
                       & set_masks);
     }
   else
-    target_flags |= (processor_target_table[cpu_index].target_enable
-                    & ~target_flags_explicit);
+    rs6000_flags |= (processor_target_table[cpu_index].target_enable
+                    & ~rs6000_flags_explicit);
 
   if (rs6000_tune_index >= 0)
     tune_index = rs6000_tune_index;
@@ -2603,7 +2603,7 @@ rs6000_option_override_internal (bool gl
      use instructions that would be microcoded on the Cell, use the
      load/store multiple and string instructions.  */
   if (BYTES_BIG_ENDIAN && optimize_size && rs6000_gen_cell_microcode)
-    target_flags |= ~target_flags_explicit & (MASK_MULTIPLE | MASK_STRING);
+    rs6000_flags |= ~rs6000_flags_explicit & (MASK_MULTIPLE | MASK_STRING);
 
   /* Don't allow -mmultiple or -mstring on little endian systems
      unless the cpu is a 750, because the hardware doesn't support the
@@ -2615,15 +2615,15 @@ rs6000_option_override_internal (bool gl
     {
       if (TARGET_MULTIPLE)
        {
-         target_flags &= ~MASK_MULTIPLE;
-         if ((target_flags_explicit & MASK_MULTIPLE) != 0)
+         rs6000_flags &= ~MASK_MULTIPLE;
+         if ((rs6000_flags_explicit & MASK_MULTIPLE) != 0)
            warning (0, "-mmultiple is not supported on little endian systems");
        }
 
       if (TARGET_STRING)
        {
-         target_flags &= ~MASK_STRING;
-         if ((target_flags_explicit & MASK_STRING) != 0)
+         rs6000_flags &= ~MASK_STRING;
+         if ((rs6000_flags_explicit & MASK_STRING) != 0)
            warning (0, "-mstring is not supported on little endian systems");
        }
     }
@@ -2635,10 +2635,10 @@ rs6000_option_override_internal (bool gl
       if (!TARGET_HARD_FLOAT || !TARGET_FPRS
          || !TARGET_SINGLE_FLOAT || !TARGET_DOUBLE_FLOAT)
        {
-         if (target_flags_explicit & MASK_VSX)
+         if (rs6000_flags_explicit & MASK_VSX)
            msg = N_("-mvsx requires hardware floating point");
          else
-           target_flags &= ~ MASK_VSX;
+           rs6000_flags &= ~ MASK_VSX;
        }
       else if (TARGET_PAIRED_FLOAT)
        msg = N_("-mvsx and -mpaired are incompatible");
@@ -2649,9 +2649,9 @@ rs6000_option_override_internal (bool gl
        msg = N_("-mvsx used with little endian code");
       else if (TARGET_AVOID_XFORM > 0)
        msg = N_("-mvsx needs indexed addressing");
-      else if (!TARGET_ALTIVEC && (target_flags_explicit & MASK_ALTIVEC))
+      else if (!TARGET_ALTIVEC && (rs6000_flags_explicit & MASK_ALTIVEC))
         {
-         if (target_flags_explicit & MASK_VSX)
+         if (rs6000_flags_explicit & MASK_VSX)
            msg = N_("-mvsx and -mno-altivec are incompatible");
          else
            msg = N_("-mno-altivec disables vsx");
@@ -2660,27 +2660,27 @@ rs6000_option_override_internal (bool gl
       if (msg)
        {
          warning (0, msg);
-         target_flags &= ~ MASK_VSX;
-         target_flags_explicit |= MASK_VSX;
+         rs6000_flags &= ~ MASK_VSX;
+         rs6000_flags_explicit |= MASK_VSX;
        }
     }
 
   /* For the newer switches (vsx, dfp, etc.) set some of the older options,
      unless the user explicitly used the -mno-<option> to disable the code.  */
   if (TARGET_VSX)
-    target_flags |= (ISA_2_6_MASKS_SERVER & ~target_flags_explicit);
+    rs6000_flags |= (ISA_2_6_MASKS_SERVER & ~rs6000_flags_explicit);
   else if (TARGET_POPCNTD)
-    target_flags |= (ISA_2_6_MASKS_EMBEDDED & ~target_flags_explicit);
+    rs6000_flags |= (ISA_2_6_MASKS_EMBEDDED & ~rs6000_flags_explicit);
   else if (TARGET_DFP)
-    target_flags |= (ISA_2_5_MASKS_SERVER & ~target_flags_explicit);
+    rs6000_flags |= (ISA_2_5_MASKS_SERVER & ~rs6000_flags_explicit);
   else if (TARGET_CMPB)
-    target_flags |= (ISA_2_5_MASKS_EMBEDDED & ~target_flags_explicit);
+    rs6000_flags |= (ISA_2_5_MASKS_EMBEDDED & ~rs6000_flags_explicit);
   else if (TARGET_FPRND)
-    target_flags |= (ISA_2_4_MASKS & ~target_flags_explicit);
+    rs6000_flags |= (ISA_2_4_MASKS & ~rs6000_flags_explicit);
   else if (TARGET_POPCNTB)
-    target_flags |= (ISA_2_2_MASKS & ~target_flags_explicit);
+    rs6000_flags |= (ISA_2_2_MASKS & ~rs6000_flags_explicit);
   else if (TARGET_ALTIVEC)
-    target_flags |= (MASK_PPC_GFXOPT & ~target_flags_explicit);
+    rs6000_flags |= (MASK_PPC_GFXOPT & ~rs6000_flags_explicit);
 
   /* E500mc does "better" if we inline more aggressively.  Respect the
      user's opinion, though.  */
@@ -2759,7 +2759,7 @@ rs6000_option_override_internal (bool gl
      unless the altivec ABI was set.  This is set by default for 64-bit, but
      not for 32-bit.  */
   if (main_target_opt != NULL && !main_target_opt->x_rs6000_altivec_abi)
-    target_flags &= ~((MASK_VSX | MASK_ALTIVEC) & ~target_flags_explicit);
+    rs6000_flags &= ~((MASK_VSX | MASK_ALTIVEC) & ~rs6000_flags_explicit);
 
   /* Enable Altivec ABI for AIX -maltivec.  */
   if (TARGET_XCOFF && (TARGET_ALTIVEC || TARGET_VSX))
@@ -2837,14 +2837,14 @@ rs6000_option_override_internal (bool gl
       rs6000_single_float = TARGET_E500_SINGLE || TARGET_E500_DOUBLE;
       rs6000_double_float = TARGET_E500_DOUBLE;
 
-      target_flags &= ~MASK_STRING;
+      rs6000_flags &= ~MASK_STRING;
 
       break;
 
     default:
 
-      if (have_cpu && !(target_flags_explicit & MASK_ISEL))
-       target_flags &= ~MASK_ISEL;
+      if (have_cpu && !(rs6000_flags_explicit & MASK_ISEL))
+       rs6000_flags &= ~MASK_ISEL;
 
       break;
     }
@@ -3216,9 +3216,9 @@ rs6000_option_override_internal (bool gl
     }
 
   /* Set the builtin mask of the various options used that could affect which
-     builtins were used.  In the past we used target_flags, but we've run out
+     builtins were used.  In the past we used rs6000_flags, but we've run out
      of bits, and some options like SPE and PAIRED are no longer in
-     target_flags.  */
+     rs6000_flags.  */
   rs6000_builtin_mask = rs6000_builtin_mask_calculate ();
   if (TARGET_DEBUG_BUILTIN || TARGET_DEBUG_TARGET)
     {
@@ -25330,7 +25330,7 @@ rs6000_darwin_file_start (void)
   i = 0;
   while (mapping[i].arg != NULL
         && strcmp (mapping[i].arg, cpu_id) != 0
-        && (mapping[i].if_set & target_flags) == 0)
+        && (mapping[i].if_set & rs6000_flags) == 0)
     i++;
 
   fprintf (asm_out_file, "\t.machine %s\n", mapping[i].name);
@@ -27583,7 +27583,7 @@ rs6000_inner_target_options (tree args, 
                    else
                      {
                        error_p = false;
-                       target_flags_explicit |= mask;
+                       rs6000_flags_explicit |= mask;
 
                        /* VSX needs altivec, so -mvsx automagically sets
                           altivec.  */
@@ -27594,9 +27594,9 @@ rs6000_inner_target_options (tree args, 
                          invert = !invert;
 
                        if (invert)
-                         target_flags &= ~mask;
+                         rs6000_flags &= ~mask;
                        else
-                         target_flags |= mask;
+                         rs6000_flags |= mask;
                      }
                    break;
                  }
@@ -27851,10 +27851,10 @@ rs6000_pragma_target_parse (tree args, t
     {
       prev_opt    = TREE_TARGET_OPTION (prev_tree);
       prev_bumask = prev_opt->x_rs6000_builtin_mask;
-      prev_flags  = prev_opt->x_target_flags;
+      prev_flags  = prev_opt->x_rs6000_flags;
 
       cur_opt     = TREE_TARGET_OPTION (cur_tree);
-      cur_flags   = cur_opt->x_target_flags;
+      cur_flags   = cur_opt->x_rs6000_flags;
       cur_bumask  = cur_opt->x_rs6000_builtin_mask;
 
       diff_bumask = (prev_bumask ^ cur_bumask);
@@ -27961,7 +27961,8 @@ rs6000_set_current_function (tree fndecl
 static void
 rs6000_function_specific_save (struct cl_target_option *ptr)
 {
-  ptr->rs6000_target_flags_explicit = target_flags_explicit;
+  ptr->x_rs6000_flags = rs6000_flags;
+  ptr->x_rs6000_flags_explicit = rs6000_flags_explicit;
 }
 
 /* Restore the current options */
@@ -27969,7 +27970,8 @@ rs6000_function_specific_save (struct cl
 static void
 rs6000_function_specific_restore (struct cl_target_option *ptr)
 {
-  target_flags_explicit = ptr->rs6000_target_flags_explicit;
+  rs6000_flags = ptr->x_rs6000_flags;
+  rs6000_flags_explicit = ptr->x_rs6000_flags_explicit;
   (void) rs6000_option_override_internal (false);
 }
 
@@ -27980,10 +27982,10 @@ rs6000_function_specific_print (FILE *fi
                                struct cl_target_option *ptr)
 {
   rs6000_print_isa_options (file, indent, "Isa options set",
-                           ptr->x_target_flags);
+                           ptr->x_rs6000_flags);
 
   rs6000_print_isa_options (file, indent, "Isa options explicit",
-                           ptr->rs6000_target_flags_explicit);
+                           ptr->x_rs6000_flags_explicit);
 }
 
 /* Helper function to print the current isa or misc options on a line.  */
@@ -28093,8 +28095,8 @@ rs6000_can_inline_p (tree caller, tree c
       /* Callee's options should a subset of the caller's, i.e. a vsx function
         can inline an altivec function but a non-vsx function can't inline a
         vsx function.  */
-      if ((caller_opts->x_target_flags & callee_opts->x_target_flags)
-         == callee_opts->x_target_flags)
+      if ((caller_opts->x_rs6000_flags & callee_opts->x_rs6000_flags)
+         == callee_opts->x_rs6000_flags)
        ret = true;
     }
 
Index: gcc/common/config/rs6000/rs6000-common.c
===================================================================
--- gcc/common/config/rs6000/rs6000-common.c    (revision 192400)
+++ gcc/common/config/rs6000/rs6000-common.c    (working copy)
@@ -82,23 +82,23 @@ rs6000_handle_option (struct gcc_options
   switch (code)
     {
     case OPT_mfull_toc:
-      opts->x_target_flags &= ~MASK_MINIMAL_TOC;
+      opts->x_rs6000_flags &= ~MASK_MINIMAL_TOC;
       opts->x_TARGET_NO_FP_IN_TOC = 0;
       opts->x_TARGET_NO_SUM_IN_TOC = 0;
-      opts_set->x_target_flags |= MASK_MINIMAL_TOC;
+      opts_set->x_rs6000_flags |= MASK_MINIMAL_TOC;
 #ifdef TARGET_USES_SYSV4_OPT
       /* Note, V.4 no longer uses a normal TOC, so make -mfull-toc, be
         just the same as -mminimal-toc.  */
-      opts->x_target_flags |= MASK_MINIMAL_TOC;
-      opts_set->x_target_flags |= MASK_MINIMAL_TOC;
+      opts->x_rs6000_flags |= MASK_MINIMAL_TOC;
+      opts_set->x_rs6000_flags |= MASK_MINIMAL_TOC;
 #endif
       break;
 
 #ifdef TARGET_USES_SYSV4_OPT
     case OPT_mtoc:
       /* Make -mtoc behave like -mminimal-toc.  */
-      opts->x_target_flags |= MASK_MINIMAL_TOC;
-      opts_set->x_target_flags |= MASK_MINIMAL_TOC;
+      opts->x_rs6000_flags |= MASK_MINIMAL_TOC;
+      opts_set->x_rs6000_flags |= MASK_MINIMAL_TOC;
       break;
 #endif
 
@@ -107,9 +107,9 @@ rs6000_handle_option (struct gcc_options
 #else
     case OPT_m64:
 #endif
-      opts->x_target_flags |= MASK_POWERPC64;
-      opts->x_target_flags |= ~opts_set->x_target_flags & MASK_PPC_GFXOPT;
-      opts_set->x_target_flags |= MASK_POWERPC64;
+      opts->x_rs6000_flags |= MASK_POWERPC64;
+      opts->x_rs6000_flags |= ~opts_set->x_rs6000_flags & MASK_PPC_GFXOPT;
+      opts_set->x_rs6000_flags |= MASK_POWERPC64;
       break;
 
 #ifdef TARGET_USES_AIX64_OPT
@@ -117,8 +117,8 @@ rs6000_handle_option (struct gcc_options
 #else
     case OPT_m32:
 #endif
-      opts->x_target_flags &= ~MASK_POWERPC64;
-      opts_set->x_target_flags |= MASK_POWERPC64;
+      opts->x_rs6000_flags &= ~MASK_POWERPC64;
+      opts_set->x_rs6000_flags |= MASK_POWERPC64;
       break;
 
     case OPT_mminimal_toc:
@@ -181,8 +181,8 @@ rs6000_handle_option (struct gcc_options
     case OPT_mrelocatable:
       if (value == 1)
        {
-         opts->x_target_flags |= MASK_MINIMAL_TOC;
-         opts_set->x_target_flags |= MASK_MINIMAL_TOC;
+         opts->x_rs6000_flags |= MASK_MINIMAL_TOC;
+         opts_set->x_rs6000_flags |= MASK_MINIMAL_TOC;
          opts->x_TARGET_NO_FP_IN_TOC = 1;
        }
       break;
@@ -190,14 +190,14 @@ rs6000_handle_option (struct gcc_options
     case OPT_mrelocatable_lib:
       if (value == 1)
        {
-         opts->x_target_flags |= MASK_RELOCATABLE | MASK_MINIMAL_TOC;
-         opts_set->x_target_flags |= MASK_RELOCATABLE | MASK_MINIMAL_TOC;
+         opts->x_rs6000_flags |= MASK_RELOCATABLE | MASK_MINIMAL_TOC;
+         opts_set->x_rs6000_flags |= MASK_RELOCATABLE | MASK_MINIMAL_TOC;
          opts->x_TARGET_NO_FP_IN_TOC = 1;
        }
       else
        {
-         opts->x_target_flags &= ~MASK_RELOCATABLE;
-         opts_set->x_target_flags |= MASK_RELOCATABLE;
+         opts->x_rs6000_flags &= ~MASK_RELOCATABLE;
+         opts_set->x_rs6000_flags |= MASK_RELOCATABLE;
        }
       break;
 #endif
@@ -227,15 +227,15 @@ rs6000_handle_option (struct gcc_options
                    "-msingle-float option equivalent to -mhard-float");
       /* -msingle-float implies -mno-double-float and TARGET_HARD_FLOAT. */
       opts->x_rs6000_double_float = 0;
-      opts->x_target_flags &= ~MASK_SOFT_FLOAT;
-      opts_set->x_target_flags |= MASK_SOFT_FLOAT;
+      opts->x_rs6000_flags &= ~MASK_SOFT_FLOAT;
+      opts_set->x_rs6000_flags |= MASK_SOFT_FLOAT;
       break;
 
     case OPT_mdouble_float:
       /* -mdouble-float implies -msingle-float and TARGET_HARD_FLOAT. */
       opts->x_rs6000_single_float = 1;
-      opts->x_target_flags &= ~MASK_SOFT_FLOAT;
-      opts_set->x_target_flags |= MASK_SOFT_FLOAT;
+      opts->x_rs6000_flags &= ~MASK_SOFT_FLOAT;
+      opts_set->x_rs6000_flags |= MASK_SOFT_FLOAT;
       break;
 
     case OPT_msimple_fpu:
@@ -259,8 +259,8 @@ rs6000_handle_option (struct gcc_options
        {
          /* If -mfpu is not none, then turn off SOFT_FLOAT, turn on
             HARD_FLOAT. */
-         opts->x_target_flags &= ~MASK_SOFT_FLOAT;
-         opts_set->x_target_flags |= MASK_SOFT_FLOAT;
+         opts->x_rs6000_flags &= ~MASK_SOFT_FLOAT;
+         opts_set->x_rs6000_flags |= MASK_SOFT_FLOAT;
          opts->x_rs6000_xilinx_fpu = 1;
          if (fpu_type == FPU_SF_LITE || fpu_type == FPU_SF_FULL) 
            opts->x_rs6000_single_float = 1;
@@ -272,8 +272,8 @@ rs6000_handle_option (struct gcc_options
       else
        {
          /* -mfpu=none is equivalent to -msoft-float.  */
-         opts->x_target_flags |= MASK_SOFT_FLOAT;
-         opts_set->x_target_flags |= MASK_SOFT_FLOAT;
+         opts->x_rs6000_flags |= MASK_SOFT_FLOAT;
+         opts_set->x_rs6000_flags |= MASK_SOFT_FLOAT;
          opts->x_rs6000_single_float = opts->x_rs6000_double_float = 0;
        }
       break;
@@ -298,7 +298,6 @@ rs6000_handle_option (struct gcc_options
 #define TARGET_OPTION_OPTIMIZATION_TABLE rs6000_option_optimization_table
 
 #undef TARGET_DEFAULT_TARGET_FLAGS
-#define TARGET_DEFAULT_TARGET_FLAGS \
-  (TARGET_DEFAULT)
+#define TARGET_DEFAULT_TARGET_FLAGS 0
 
 struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER;
Index: gcc/config/rs6000/aix43.h
===================================================================
--- gcc/config/rs6000/aix43.h   (revision 192400)
+++ gcc/config/rs6000/aix43.h   (working copy)
@@ -26,7 +26,7 @@
 do {                                                                   \
   if (TARGET_64BIT && ! TARGET_POWERPC64)                              \
     {                                                                  \
-      target_flags |= MASK_POWERPC64;                                  \
+      rs6000_flags |= MASK_POWERPC64;                                  \
       warning (0, "-maix64 requires PowerPC64 architecture remain enabled"); \
     }                                                                  \
   if (TARGET_SOFT_FLOAT && TARGET_LONG_DOUBLE_128)                     \
Index: gcc/config/rs6000/aix51.h
===================================================================
--- gcc/config/rs6000/aix51.h   (revision 192400)
+++ gcc/config/rs6000/aix51.h   (working copy)
@@ -26,7 +26,7 @@
 do {                                                                   \
   if (TARGET_64BIT && ! TARGET_POWERPC64)                              \
     {                                                                  \
-      target_flags |= MASK_POWERPC64;                                  \
+      rs6000_flags |= MASK_POWERPC64;                                  \
       warning (0, "-maix64 requires PowerPC64 architecture remain enabled"); \
     }                                                                  \
   if (TARGET_POWERPC64 && ! TARGET_64BIT)                              \
Index: gcc/config/rs6000/aix52.h
===================================================================
--- gcc/config/rs6000/aix52.h   (revision 192400)
+++ gcc/config/rs6000/aix52.h   (working copy)
@@ -26,7 +26,7 @@
 do {                                                                   \
   if (TARGET_64BIT && ! TARGET_POWERPC64)                              \
     {                                                                  \
-      target_flags |= MASK_POWERPC64;                                  \
+      rs6000_flags |= MASK_POWERPC64;                                  \
       warning (0, "-maix64 requires PowerPC64 architecture remain enabled"); \
     }                                                                  \
   if (TARGET_SOFT_FLOAT && TARGET_LONG_DOUBLE_128)                     \
Index: gcc/config/rs6000/aix53.h
===================================================================
--- gcc/config/rs6000/aix53.h   (revision 192400)
+++ gcc/config/rs6000/aix53.h   (working copy)
@@ -26,7 +26,7 @@
 do {                                                                   \
   if (TARGET_64BIT && ! TARGET_POWERPC64)                              \
     {                                                                  \
-      target_flags |= MASK_POWERPC64;                                  \
+      rs6000_flags |= MASK_POWERPC64;                                  \
       warning (0, "-maix64 requires PowerPC64 architecture remain enabled"); \
     }                                                                  \
   if (TARGET_SOFT_FLOAT && TARGET_LONG_DOUBLE_128)                     \
Index: gcc/config/rs6000/aix61.h
===================================================================
--- gcc/config/rs6000/aix61.h   (revision 192400)
+++ gcc/config/rs6000/aix61.h   (working copy)
@@ -26,7 +26,7 @@
 do {                                                                   \
   if (TARGET_64BIT && ! TARGET_POWERPC64)                              \
     {                                                                  \
-      target_flags |= MASK_POWERPC64;                                  \
+      rs6000_flags |= MASK_POWERPC64;                                  \
       warning (0, "-maix64 requires PowerPC64 architecture remain enabled"); \
     }                                                                  \
   if (TARGET_SOFT_FLOAT && TARGET_LONG_DOUBLE_128)                     \
Index: gcc/config/rs6000/freebsd.h
===================================================================
--- gcc/config/rs6000/freebsd.h (revision 192400)
+++ gcc/config/rs6000/freebsd.h (working copy)
@@ -72,7 +72,7 @@
    -mrelocatable or -mrelocatable-lib is given.  */
 #undef RELOCATABLE_NEEDS_FIXUP
 #define RELOCATABLE_NEEDS_FIXUP \
-  (target_flags & target_flags_explicit & MASK_RELOCATABLE)
+  (rs6000_flags & rs6000_flags_explicit & MASK_RELOCATABLE)
 
 #define DBX_REGISTER_NUMBER(REGNO) rs6000_dbx_register_number (REGNO)
 
Index: gcc/config/rs6000/freebsd64.h
===================================================================
--- gcc/config/rs6000/freebsd64.h       (revision 192400)
+++ gcc/config/rs6000/freebsd64.h       (working copy)
@@ -57,7 +57,7 @@ extern int dot_symbols;
    -mrelocatable or -mrelocatable-lib is given.  */
 #undef RELOCATABLE_NEEDS_FIXUP
 #define RELOCATABLE_NEEDS_FIXUP \
-  (target_flags & target_flags_explicit & MASK_RELOCATABLE)
+  (rs6000_flags & rs6000_flags_explicit & MASK_RELOCATABLE)
 
 #undef  RS6000_ABI_NAME
 #define RS6000_ABI_NAME "freebsd"
@@ -79,14 +79,14 @@ extern int dot_symbols;
              error (INVALID_64BIT, "call");                    \
            }                                                   \
          dot_symbols = !strcmp (rs6000_abi_name, "aixdesc");   \
-         if (target_flags & MASK_RELOCATABLE)                  \
+         if (rs6000_flags & MASK_RELOCATABLE)                  \
            {                                                   \
-             target_flags &= ~MASK_RELOCATABLE;                \
+             rs6000_flags &= ~MASK_RELOCATABLE;                \
              error (INVALID_64BIT, "relocatable");             \
            }                                                   \
-         if (target_flags & MASK_EABI)                         \
+         if (rs6000_flags & MASK_EABI)                         \
            {                                                   \
-             target_flags &= ~MASK_EABI;                       \
+             rs6000_flags &= ~MASK_EABI;                       \
              error (INVALID_64BIT, "eabi");                    \
            }                                                   \
          if (TARGET_PROTOTYPE)                                 \
@@ -94,12 +94,12 @@ extern int dot_symbols;
              target_prototype = 0;                             \
              error (INVALID_64BIT, "prototype");               \
            }                                                   \
-         if ((target_flags & MASK_POWERPC64) == 0)             \
+         if ((rs6000_flags & MASK_POWERPC64) == 0)             \
            {                                                   \
-             target_flags |= MASK_POWERPC64;                   \
+             rs6000_flags |= MASK_POWERPC64;                   \
              error ("-m64 requires a PowerPC64 cpu");          \
            }                                                   \
-          if ((target_flags_explicit & MASK_MINIMAL_TOC) != 0) \
+          if ((rs6000_flags_explicit & MASK_MINIMAL_TOC) != 0) \
            {                                                   \
              if (global_options_set.x_rs6000_current_cmodel    \
                  && rs6000_current_cmodel != CMODEL_SMALL)     \
Index: gcc/config/rs6000/linux.h
===================================================================
--- gcc/config/rs6000/linux.h   (revision 192400)
+++ gcc/config/rs6000/linux.h   (working copy)
@@ -109,7 +109,7 @@
    -mrelocatable or -mrelocatable-lib is given.  */
 #undef RELOCATABLE_NEEDS_FIXUP
 #define RELOCATABLE_NEEDS_FIXUP \
-  (target_flags & target_flags_explicit & MASK_RELOCATABLE)
+  (rs6000_flags & rs6000_flags_explicit & MASK_RELOCATABLE)
 
 #define TARGET_POSIX_IO
 
Index: gcc/config/rs6000/linux64.h
===================================================================
--- gcc/config/rs6000/linux64.h (revision 192400)
+++ gcc/config/rs6000/linux64.h (working copy)
@@ -81,7 +81,7 @@ extern int dot_symbols;
    -mrelocatable or -mrelocatable-lib is given.  */
 #undef RELOCATABLE_NEEDS_FIXUP
 #define RELOCATABLE_NEEDS_FIXUP \
-  (target_flags & target_flags_explicit & MASK_RELOCATABLE)
+  (rs6000_flags & rs6000_flags_explicit & MASK_RELOCATABLE)
 
 #undef RS6000_ABI_NAME
 #define        RS6000_ABI_NAME "linux"
@@ -103,14 +103,14 @@ extern int dot_symbols;
              error (INVALID_64BIT, "call");                    \
            }                                                   \
          dot_symbols = !strcmp (rs6000_abi_name, "aixdesc");   \
-         if (target_flags & MASK_RELOCATABLE)                  \
+         if (rs6000_flags & MASK_RELOCATABLE)                  \
            {                                                   \
-             target_flags &= ~MASK_RELOCATABLE;                \
+             rs6000_flags &= ~MASK_RELOCATABLE;                \
              error (INVALID_64BIT, "relocatable");             \
            }                                                   \
-         if (target_flags & MASK_EABI)                         \
+         if (rs6000_flags & MASK_EABI)                         \
            {                                                   \
-             target_flags &= ~MASK_EABI;                       \
+             rs6000_flags &= ~MASK_EABI;                       \
              error (INVALID_64BIT, "eabi");                    \
            }                                                   \
          if (TARGET_PROTOTYPE)                                 \
@@ -118,12 +118,12 @@ extern int dot_symbols;
              target_prototype = 0;                             \
              error (INVALID_64BIT, "prototype");               \
            }                                                   \
-         if ((target_flags & MASK_POWERPC64) == 0)             \
+         if ((rs6000_flags & MASK_POWERPC64) == 0)             \
            {                                                   \
-             target_flags |= MASK_POWERPC64;                   \
+             rs6000_flags |= MASK_POWERPC64;                   \
              error ("-m64 requires a PowerPC64 cpu");          \
            }                                                   \
-         if ((target_flags_explicit & MASK_MINIMAL_TOC) != 0)  \
+         if ((rs6000_flags_explicit & MASK_MINIMAL_TOC) != 0)  \
            {                                                   \
              if (global_options_set.x_rs6000_current_cmodel    \
                  && rs6000_current_cmodel != CMODEL_SMALL)     \
Index: gcc/config/rs6000/rs6000-c.c
===================================================================
--- gcc/config/rs6000/rs6000-c.c        (revision 192400)
+++ gcc/config/rs6000/rs6000-c.c        (working copy)
@@ -295,7 +295,7 @@ rs6000_target_modify_macros (bool define
             (define_p) ? "define" : "undef",
             flags, bu_mask);
 
-  /* target_flags based options.  */
+  /* rs6000_flags based options.  */
   rs6000_define_or_undefine_macro (define_p, "_ARCH_PPC");
   if ((flags & MASK_PPC_GPOPT) != 0)
     rs6000_define_or_undefine_macro (define_p, "_ARCH_PPCSQ");
@@ -345,7 +345,7 @@ void
 rs6000_cpu_cpp_builtins (cpp_reader *pfile)
 {
   /* Define all of the common macros.  */
-  rs6000_target_modify_macros (true, target_flags,
+  rs6000_target_modify_macros (true, rs6000_flags,
                               rs6000_builtin_mask_calculate ());
 
   if (TARGET_FRE)
Index: gcc/config/rs6000/rs6000.h
===================================================================
--- gcc/config/rs6000/rs6000.h  (revision 192400)
+++ gcc/config/rs6000/rs6000.h  (working copy)
@@ -654,7 +654,7 @@ extern unsigned char rs6000_recip_bits[]
 #define LONG_DOUBLE_TYPE_SIZE rs6000_long_double_type_size
 
 /* Define this to set long double type size to use in libgcc2.c, which can
-   not depend on target_flags.  */
+   not depend on rs6000_flags.  */
 #ifdef __LONG_DOUBLE_128__
 #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128
 #else
@@ -2274,7 +2274,7 @@ extern int frame_pointer_needed;
 
 /* Builtin targets.  For now, we reuse the masks for those options that are in
    target flags, and pick two random bits for SPE and paired which aren't in
-   target_flags.  */
+   rs6000_flags.  */
 #define RS6000_BTM_ALWAYS      0               /* Always enabled.  */
 #define RS6000_BTM_ALTIVEC     MASK_ALTIVEC    /* VMX/altivec vectors.  */
 #define RS6000_BTM_VSX         MASK_VSX        /* VSX (vector/scalar).  */
Index: gcc/config/rs6000/rs6000-opts.h
===================================================================
--- gcc/config/rs6000/rs6000-opts.h     (revision 192400)
+++ gcc/config/rs6000/rs6000-opts.h     (working copy)
@@ -146,4 +146,8 @@ enum rs6000_vector {
    we need to distinguish the special "native" value.  */
 #define RS6000_CPU_OPTION_NATIVE -1
 
+/* All switches explicitly set by the user on the command line (both -mswitch
+   and -mno-switch) versions. */
+#define rs6000_flags_explicit global_options_set.x_rs6000_flags
+
 #endif
Index: gcc/config/rs6000/sysv4.h
===================================================================
--- gcc/config/rs6000/sysv4.h   (revision 192400)
+++ gcc/config/rs6000/sysv4.h   (working copy)
@@ -40,8 +40,8 @@
 #undef ASM_DEFAULT_SPEC
 #define        ASM_DEFAULT_SPEC "-mppc"
 
-#define        TARGET_TOC              ((target_flags & MASK_64BIT)            
\
-                                || ((target_flags & (MASK_RELOCATABLE  \
+#define        TARGET_TOC              ((rs6000_flags & MASK_64BIT)            
\
+                                || ((rs6000_flags & (MASK_RELOCATABLE  \
                                                      | MASK_MINIMAL_TOC)) \
                                     && flag_pic > 1)                   \
                                 || DEFAULT_ABI == ABI_AIX)
@@ -77,13 +77,13 @@ do {                                                        
                \
   else if (!strcmp (rs6000_abi_name, "sysv-noeabi"))                   \
     {                                                                  \
       rs6000_current_abi = ABI_V4;                                     \
-      target_flags &= ~ MASK_EABI;                                     \
+      rs6000_flags &= ~ MASK_EABI;                                     \
     }                                                                  \
   else if (!strcmp (rs6000_abi_name, "sysv-eabi")                      \
           || !strcmp (rs6000_abi_name, "eabi"))                        \
     {                                                                  \
       rs6000_current_abi = ABI_V4;                                     \
-      target_flags |= MASK_EABI;                                       \
+      rs6000_flags |= MASK_EABI;                                       \
     }                                                                  \
   else if (!strcmp (rs6000_abi_name, "aixdesc"))                       \
     rs6000_current_abi = ABI_AIX;                                      \
@@ -102,8 +102,8 @@ do {                                                        
                \
   else if (!strcmp (rs6000_abi_name, "i960-old"))                      \
     {                                                                  \
       rs6000_current_abi = ABI_V4;                                     \
-      target_flags |= (MASK_LITTLE_ENDIAN | MASK_EABI);                        
\
-      target_flags &= ~MASK_STRICT_ALIGN;                              \
+      rs6000_flags |= (MASK_LITTLE_ENDIAN | MASK_EABI);                        
\
+      rs6000_flags &= ~MASK_STRICT_ALIGN;                              \
       TARGET_NO_BITFIELD_WORD = 1;                                     \
     }                                                                  \
   else                                                                 \
@@ -168,13 +168,13 @@ do {                                                      
                \
                                                                        \
   if (TARGET_RELOCATABLE && !TARGET_MINIMAL_TOC)                       \
     {                                                                  \
-      target_flags |= MASK_MINIMAL_TOC;                                        
\
+      rs6000_flags |= MASK_MINIMAL_TOC;                                        
\
       error ("-mrelocatable and -mno-minimal-toc are incompatible");   \
     }                                                                  \
                                                                        \
   if (TARGET_RELOCATABLE && rs6000_current_abi == ABI_AIX)             \
     {                                                                  \
-      target_flags &= ~MASK_RELOCATABLE;                               \
+      rs6000_flags &= ~MASK_RELOCATABLE;                               \
       error ("-mrelocatable and -mcall-%s are incompatible",           \
             rs6000_abi_name);                                          \
     }                                                                  \
@@ -188,7 +188,7 @@ do {                                                        
                \
                                                                        \
   if (rs6000_current_abi == ABI_AIX && TARGET_LITTLE_ENDIAN)           \
     {                                                                  \
-      target_flags &= ~MASK_LITTLE_ENDIAN;                             \
+      rs6000_flags &= ~MASK_LITTLE_ENDIAN;                             \
       error ("-mcall-aixdesc must be big endian");                     \
     }                                                                  \
                                                                        \
@@ -200,7 +200,7 @@ do {                                                        
                \
   /* Treat -fPIC the same as -mrelocatable.  */                                
\
   if (flag_pic > 1 && DEFAULT_ABI != ABI_AIX)                          \
     {                                                                  \
-      target_flags |= MASK_RELOCATABLE | MASK_MINIMAL_TOC;             \
+      rs6000_flags |= MASK_RELOCATABLE | MASK_MINIMAL_TOC;             \
       TARGET_NO_FP_IN_TOC = 1;                                         \
     }                                                                  \
                                                                        \
@@ -212,9 +212,9 @@ do {                                                        
                \
 #ifndef RS6000_BI_ARCH
 # define SUBSUBTARGET_OVERRIDE_OPTIONS                                 \
 do {                                                                   \
-  if ((TARGET_DEFAULT ^ target_flags) & MASK_64BIT)                    \
+  if ((TARGET_DEFAULT ^ rs6000_flags) & MASK_64BIT)                    \
     error ("-m%s not supported in this configuration",                 \
-          (target_flags & MASK_64BIT) ? "64" : "32");                  \
+          (rs6000_flags & MASK_64BIT) ? "64" : "32");                  \
 } while (0)
 #endif
 
@@ -500,7 +500,7 @@ extern int fixuplabelno;
 #define TARGET_OS_SYSV_CPP_BUILTINS()          \
   do                                           \
     {                                          \
-      if (target_flags_explicit                        \
+      if (rs6000_flags_explicit                        \
          & MASK_RELOCATABLE)                   \
        builtin_define ("_RELOCATABLE");        \
     }                                          \

Reply via email to