* 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
-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.
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})
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}.
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)
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)"
}