options.texi: Document the new MaskExists flag.

* 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
This commit is contained in:
Richard Sandiford 2005-03-30 06:26:20 +00:00 committed by Richard Sandiford
parent a56a077922
commit f9b4c1db7d
3 changed files with 19 additions and 3 deletions

View 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.

View 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}.

View 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)"
}