This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [DOC PATCH]: Document --enable-cld and -mcld options


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]