This is another patch in the series to make documentation of
target-specific options in invoke.texi match what is in the
corresponding .opt files.

The cris.opt file is a bit strange, with many cases where negative
forms are listed explicitly as separate options from the positive
forms, with both having "RejectNegative" and one (typically the form
that is the default) being marked as "Undocumented".  I've left that
alone since fixing it to the more normal style of having a single
option setting a boolean flag would require code changes, and I'm not
set up to build or test this target.

Beyond that, the "Undocumented" status of options in the .opt file did
not in several cases match what was actually documented in the manual.
I've generally assumed that the manual is correct, and e.g. the
-m32-bit, -m16-bit, and -m8-bit options, all previously marked
"Undocumented" but listed in invoke.texi, are preferred to the
equivalent options without the hyphen.  I've removed the references to
the obsolete -melf and -maout options and added documentation in the
manual for some options that were previously documented only in the .opt
file.

gcc/ChangeLog
        PR other/122243
        * config/cris/cris.opt (m32-bit, m16-bit, m8-bit): Remove
        Undocumented property.
        (m32bit, m8bit): Add Undocumented property.
        * doc/invoke.texi (Option Summary) <CRIS Options>: Remove
        obsolete -melf and -maout options from table, plus redundant
        -mno-mul-bug-workaround.
        (CRIS Options): Add @opindex for -mno- forms that didn't already
        have one.  Remove obsolete -melf documentation.  Document
        -mbest-lib-options, -moverride-best-lib-options,
        -mtrap-using-break8, -mtrap-unaligned-atomic, and
        -munaligned-atomic-may-use-library.
---
 gcc/config/cris/cris.opt | 18 +++++++++++-------
 gcc/doc/invoke.texi      | 40 +++++++++++++++++++++++++++++++++++-----
 2 files changed, 46 insertions(+), 12 deletions(-)

diff --git a/gcc/config/cris/cris.opt b/gcc/config/cris/cris.opt
index 9fa9cbfe38c..55b03ee1f79 100644
--- a/gcc/config/cris/cris.opt
+++ b/gcc/config/cris/cris.opt
@@ -108,28 +108,32 @@ Do not tune code and read-only data alignment.
 
 ; See cris_handle_option.
 m32-bit
-Target RejectNegative Undocumented
-
-; See cris_handle_option.
-m32bit
 Target RejectNegative
 Align code and data to 32 bits.
 
 ; See cris_handle_option.
-m16-bit
+m32bit
 Target RejectNegative Undocumented
+Align code and data to 32 bits.
+
+; See cris_handle_option.
+m16-bit
+Target RejectNegative
+Align code and data to 16 bits.
 
 ; See cris_handle_option.
 m16bit
 Target RejectNegative Undocumented
+Align code and data to 16 bits.
 
 ; See cris_handle_option.
 m8-bit
-Target RejectNegative Undocumented
+Target RejectNegative
+Don't align items in code or data.
 
 ; See cris_handle_option.
 m8bit
-Target RejectNegative
+Target RejectNegative Undocumented
 Don't align items in code or data.
 
 ; TARGET_PROLOGUE_EPILOGUE: Whether or not to omit function
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 32deb1f13ff..1e9fe5895da 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -1009,8 +1009,11 @@ Objective-C and Objective-C++ Dialects}.
 -metrax4  -metrax100  -mpdebug  -mcc-init  -mno-side-effects
 -mstack-align  -mdata-align  -mconst-align
 -m32-bit  -m16-bit  -m8-bit  -mno-prologue-epilogue
--melf  -maout  -sim  -sim2
--mmul-bug-workaround  -mno-mul-bug-workaround}
+-mbest-lib-options  -moverride-best-lib-options
+-mtrap-using-break8  -mtrap-unaligned-atomic
+-munaligned-atomic-may-use-library
+-sim  -sim2
+-mmul-bug-workaround}
 
 @emph{C-SKY Options} (@ref{C-SKY Options})
 @gccoptlist{-march=@var{arch}  -mcpu=@var{cpu}
@@ -26228,6 +26231,8 @@ Warn when the stack frame of a function exceeds @var{n} 
bytes.
 
 @opindex metrax4
 @opindex metrax100
+@opindex mno-etrax4
+@opindex mno-etrax100
 @item -metrax4
 @itemx -metrax100
 The options @option{-metrax4} and @option{-metrax100} are synonyms for
@@ -26241,6 +26246,7 @@ Work around a bug in the @code{muls} and @code{mulu} 
instructions for CPU
 models where it applies.  This option is disabled by default.
 
 @opindex mpdebug
+@opindex mno-pddebug
 @item -mpdebug
 Enable CRIS-specific verbose debug-related information in the assembly
 code.  This option also has the effect of turning off the @samp{#NO_APP}
@@ -26248,6 +26254,7 @@ formatted-code indicator to the assembler at the 
beginning of the
 assembly file.
 
 @opindex mcc-init
+@opindex mno-cc-init
 @item -mcc-init
 Do not use condition-code results from previous instruction; always emit
 compare and test instructions before use of condition codes.
@@ -26297,9 +26304,32 @@ option only together with visual inspection of the 
compiled code: no
 warnings or errors are generated when call-saved registers must be saved,
 or storage for local variables needs to be allocated.
 
-@opindex melf
-@item -melf
-Legacy no-op option.
+@opindex mbest-lib-options
+@opindex moverride-best-lib-options
+@item -mbest-lib-options
+@itemx -moverride-best-lib-options
+@option{-mbest-lib-options} selects the most feature-enabling options
+allowed by other options.  This option has no @samp{no-} form, but
+@option{-moverride-best-lib-options} disables it regardless of the relative
+order of the two options on the command line.
+
+@opindex mtrap-using-break8
+@opindex mno-trap-using-break8
+@item -mtrap-using-break8
+Emit traps as @samp{break 8}.  This is the default for CRIS v3 and up.  If
+disabled, calls to @code{abort} are used instead.
+
+@opindex mtrap-unaligned-atomic
+@opindex mno-trap-unaligned-atomic
+@item -mtrap-unaligned-atomic
+Emit checks causing @samp{break 8} instructions to execute when
+applying atomic builtins on misaligned memory.
+
+@opindex munaligned-atomic-may-use-library
+@opindex mno-unaligned-atomic-may-use-library
+@item -munaligned-atomic-may-use-library
+Handle atomic builtins that may be applied to unaligned data by calling
+library functions.  This option overrides @option{-mtrap-unaligned-atomic}.
 
 @opindex sim
 @item -sim
-- 
2.39.5

Reply via email to