Comparing the documentation in invoke.texi with hs8300.opt, I spotted
a few options in the latter that were missing documentation, and added
it.
Also -mexr and -mno-exr are listed as separate options in the .opt
file but pretty clearly are intended to be inverses of each other, so
I added RejectNegative to both of them and combined their
documentation. I wanted to add a link to the "monitor" attribute
referenced in the existing docs for this option, but found that was
also missing, along with docs for the "OS_Task" attribute; so I fixed
those problems while I was at it.
gcc/ChangeLog
PR other/122243
* config/h8300/h8300.opt (mexr, mno-exr): Add RejectNegative.
* doc/extend.texi (H8/300 Function Attributes): Document
monitor and OS_Task attributes.
* doc/invoke.texi (Option Summary) <H8/300 Options}: Add -msx,
-ms2600, -mquickcall, -mslowbyte. Combine -mexr and -mno-exr.
(H8/300 Options): Likewise. Add @opindex entries for options
that have negative forms.
---
gcc/config/h8300/h8300.opt | 4 ++--
gcc/doc/extend.texi | 12 ++++++++++++
gcc/doc/invoke.texi | 38 ++++++++++++++++++++++++++------------
3 files changed, 40 insertions(+), 14 deletions(-)
diff --git a/gcc/config/h8300/h8300.opt b/gcc/config/h8300/h8300.opt
index 65300755051..9039318f548 100644
--- a/gcc/config/h8300/h8300.opt
+++ b/gcc/config/h8300/h8300.opt
@@ -62,10 +62,10 @@ Target RejectNegative Mask(ALIGN_300)
Use H8/300 alignment rules.
mexr
-Target Mask(EXR)
+Target Mask(EXR) RejectNegative
Push extended registers on stack in monitor functions.
mno-exr
-Target Mask(NEXR)
+Target Mask(NEXR) RejectNegative
Do not push extended registers on stack in monitor functions.
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 5b368ea200d..c5d211f78d2 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -4824,6 +4824,18 @@ interrupt handler when this attribute is present.
Use this attribute on the H8/300, H8/300H, and H8S to indicate that
all registers except the stack pointer should be saved in the prologue
regardless of whether they are used or not.
+
+@cindex @code{monitor} function attribute, H8/300
+@item monitor
+Use this attribute to indicate a monitor function. It tells GCC
+to generate entry and exit sequences that disable interrupts during
+execution of the function.
+
+@cindex @code{OS_Task} function attribute, H8/300
+@item OS_Task
+Use this attribute to disable the normal register and stack save and
+restore sequences on function entry and exit. The function epilogue
+generated by GCC includes only a return instruction.
@end table
@node IA-64 Function Attributes
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 07bf00219c6..2d820bcc530 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -1107,7 +1107,8 @@ Objective-C and Objective-C++ Dialects}.
-tno-android-cc -tno-android-ld}
@emph{H8/300 Options} (@ref{H8/300 Options})
-@gccoptlist{-mrelax -mh -ms -mn -mexr -mno-exr -mint32 -malign-300}
+@gccoptlist{-mrelax -mh -ms -mn -msx -ms2600
+-mquickcall -mslowbyte -mexr -mint32 -malign-300}
@emph{HPPA Options} (@ref{HPPA Options})
@gccoptlist{-march=@var{architecture-type}
@@ -27921,34 +27922,47 @@ linker option @option{-relax}. @xref{H8/300,,
@code{ld} and the H8/300,
ld, Using ld}, for a fuller description.
@opindex mh
+@opindex mno-h
@item -mh
Generate code for the H8/300H@.
@opindex ms
+@opindex mno-s
@item -ms
Generate code for the H8S@.
@opindex mn
+@opindex mno-n
@item -mn
Generate code for the H8S and H8/300H in the normal mode. This switch
-must be used either with @option{-mh} or @option{-ms}.
+must be used with either @option{-mh} or @option{-ms}.
+
+@opindex msx
+@opindex mno-sx
+@item -msx
+Generate H8SX code.
@opindex ms2600
+@opindex mno-s2600
@item -ms2600
Generate code for the H8S/2600. This switch must be used with @option{-ms}.
-@opindex mexr
-@item -mexr
-Extended registers are stored on stack before execution of function
-with monitor attribute. Default option is @option{-mexr}.
-This option is valid only for H8S targets.
+@opindex mquickcall
+@opindex mno-quickcall
+@item -mquickcall
+Use registers for argument passing.
+
+@opindex mslowbyte
+@item -mslowbyte
+Consider access to byte-sized memory slow.
-@opindex mno-exr
@opindex mexr
-@item -mno-exr
-Extended registers are not stored on stack before execution of function
-with monitor attribute. Default option is @option{-mno-exr}.
-This option is valid only for H8S targets.
+@opindex mno-exr
+@item -mexr
+@itemx -mno-exr
+Store extended registers on the stack before execution of functions
+with the @code{monitor} attribute (@pxref{H8/300 Function Attributes}).
+The default is @option{-mexr}. This option is valid only for H8S targets.
@opindex mint32
@item -mint32
--
2.39.5