This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [DOC PATCH]: Document --enable-cld and -mcld options
- From: Gerald Pfeifer <gerald at pfeifer dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 23 May 2008 01:30:23 +0200 (CEST)
- Subject: Re: [DOC PATCH]: Document --enable-cld and -mcld options
- References: <5787cf470805210343r612c964l7147aa12dd009d61@mail.gmail.com>
Hi Uros,
On Wed, 21 May 2008, Uros Bizjak wrote:
> Attached doc patch goes together with -mcld patch.
thanks for taking the time to write up this documentation. This is
good stuff. I am not a subject matter expert, so please take every-
thing I write with a grain of salt. ;-)
+@item -mcld
+@opindex mcld
+This option will enable GCC to generate cld instruction in the function
+prologue when string instructions are used.
"Enable" may be a bit weak here, but I am not a native speaker. My
recommendation would be to say something like
This option instructs GCC to emit a @code{cld} instruction in the
prologue of functions that use string instructions.
+String instructions depend on
+CLD flag to select between autoincrement or autodecrement mode. While ABI
+specifies CLD flag to be cleared on function entry, some operating systems
+violate this specification by not clearing CLD flag in their exception
+dispatchers.
Here we may want to add "the" and mark up CLD: "on the @code{CLD} flag",
though I am not sure about the markup part -- perhaps omit this here.
"While the ABI specifies the CLD flag..."
"the CLD flag"
+Exception handler can be invoked with set CLD flag and this
+leads to wrong direction mode, when string instructions are used in exception
+handler.
"The exception handler can be invoked with the CLD flag set which leads
to...", and perhaps omit "in exception handler" at the end?
+This option can be enabled by default on 32-bit x86 targets by
+configuring gcc with the @option{--enable-cld} configure option. Generation
+of cld instructions can be suppressed with the @option{-mno-cld} compiler
+option in this case.
"GCC"
@code{cld}
Thanks again!
Gerald