options.texi: Document the new MaskExists flag.
authorRichard Sandiford <rsandifo@redhat.com>
Wed, 30 Mar 2005 06:26:20 +0000 (06:26 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Wed, 30 Mar 2005 06:26:20 +0000 (06:26 +0000)
* doc/options.texi: Document the new MaskExists flag.
* opth-gen.awk: Don't output MASK and TARGET macros for Mask(...)
if the option has the MaskExists flag.

From-SVN: r97238

gcc/ChangeLog
gcc/doc/options.texi
gcc/opth-gen.awk

index d9f08ed2af88a6c3f5be2929b799c06c71c332d9..bd91133b4c74f3dcc4fc7fb5010b2ea14cbf02ef 100644 (file)
@@ -1,4 +1,10 @@
-2005-03-20  Richard Sandiford  <rsandifo@redhat.com>
+2005-03-30  Richard Sandiford  <rsandifo@redhat.com>
+
+       * doc/options.texi: Document the new MaskExists flag.
+       * opth-gen.awk: Don't output MASK and TARGET macros for Mask(...)
+       if the option has the MaskExists flag.
+
+2005-03-30  Richard Sandiford  <rsandifo@redhat.com>
 
        * opt-functions.awk (flag_set_p, test_flag): New functions.
        (switch_flags): Use them.
index 138ebdb838d9139549923721555b003d22471834..959f952fc9452177f483754e87ca3a2a0311d54d 100644 (file)
@@ -144,6 +144,7 @@ The options-processing script will automatically allocate a unique
 bit for the option and 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.
+You can disable this behavior using @code{MaskExists}.
 
 @item InverseMask(@var{othername})
 @itemx InverseMask(@var{othername}, @var{thisname})
@@ -152,6 +153,15 @@ The option is the inverse of another option that has the
 the options-processing script will declare a @code{TARGET_@var{thisname}}
 macro that is 1 when the option is active and 0 otherwise.
 
+@item MaskExists
+The mask specified by the @code{Mask} property already exists.
+No @code{MASK} or @code{TARGET} definitions should be added to
+@file{options.h} in response to this option record.
+
+The main purpose of this property is to support synonymous options.
+The first option should use @samp{Mask(@var{name})} and the others
+should use @samp{Mask(@var{name}) MaskExists}.
+
 @item Report
 The state of the option should be printed by @option{-fverbose-asm}.
 
index 3839af9a31c5762398e814010c7f263c9288a098..d980b12c28376fced139ca3c9b89b2974330931b 100644 (file)
@@ -70,7 +70,7 @@ for (i = 0; i < n_opts; i++) {
 masknum = 0
 for (i = 0; i < n_opts; i++) {
        name = opt_args("Mask", flags[i])
-       if (name != "")
+       if (name != "" && !flag_set_p("MaskExists", flags[i]))
                print "#define MASK_" name " (1 << " masknum++ ")"
 }
 if (masknum > 31)
@@ -79,7 +79,7 @@ print ""
 
 for (i = 0; i < n_opts; i++) {
        name = opt_args("Mask", flags[i])
-       if (name != "")
+       if (name != "" && !flag_set_p("MaskExists", flags[i]))
                print "#define TARGET_" name \
                      " ((target_flags & MASK_" name ") != 0)"
 }