diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d9f08ed2af88..bd91133b4c74 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,4 +1,10 @@ -2005-03-20 Richard Sandiford +2005-03-30 Richard Sandiford + + * 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 * opt-functions.awk (flag_set_p, test_flag): New functions. (switch_flags): Use them. diff --git a/gcc/doc/options.texi b/gcc/doc/options.texi index 138ebdb838d9..959f952fc945 100644 --- a/gcc/doc/options.texi +++ b/gcc/doc/options.texi @@ -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}. diff --git a/gcc/opth-gen.awk b/gcc/opth-gen.awk index 3839af9a31c5..d980b12c2837 100644 --- a/gcc/opth-gen.awk +++ b/gcc/opth-gen.awk @@ -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)" }