summaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-23 07:53:16 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-23 07:53:16 +0000
commit144c3e9036bdedbe3171f13fcbf1692f6d73866e (patch)
tree40050495f1a2d014b7c9ed11be27fad5038f05a0 /gcc/doc
parentfacab2ceca10e99a90eabbcdb8e2c559b0bdf28c (diff)
downloadgcc-144c3e9036bdedbe3171f13fcbf1692f6d73866e.tar.gz
PR target/36079
* configure.ac: Handle --enable-cld. * configure: Regenerated. * config.gcc: Add USE_IX86_CLD to tm_defines for x86 targets. * config/i386/i386.h (struct machine_function): Add needs_cld field. (ix86_current_function_needs_cld): New define. * config/i386/i386.md (UNSPEC_CLD): New unspec volatile constant. (cld): New isns pattern. (strmov_singleop, rep_mov, strset_singleop, rep_stos, cmpstrnqi_nz_1, cmpstrnqi_1, strlenqi_1): Set ix86_current_function_needs_cld flag. * config/i386/i386.opt (mcld): New option. * config/i386/i386.c (ix86_expand_prologue): Emit cld insn if TARGET_CLD and ix86_current_function_needs_cld. (override_options): Use -mcld by default for 32-bit code if USE_IX86_CLD. * doc/install.texi (Options specification): Document --enable-cld. * doc/invoke.texi (Machine Dependent Options) [i386 and x86-64 Options]: Add -mcld option. (Intel 386 and AMD x86-64 Options): Document -mcld option. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135792 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/install.texi10
-rw-r--r--gcc/doc/invoke.texi16
2 files changed, 25 insertions, 1 deletions
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index 0391ec86b7d..3d098a49ba8 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -1214,6 +1214,16 @@ Using the GNU Compiler Collection (GCC)},
See ``RS/6000 and PowerPC Options'' in the main manual
@end ifhtml
+@item --enable-cld
+This option enables @option{-mcld} by default for 32-bit x86 targets.
+@ifnothtml
+@xref{i386 and x86-64 Options,, i386 and x86-64 Options, gcc,
+Using the GNU Compiler Collection (GCC)},
+@end ifnothtml
+@ifhtml
+See ``i386 and x86-64 Options'' in the main manual
+@end ifhtml
+
@item --enable-win32-registry
@itemx --enable-win32-registry=@var{key}
@itemx --disable-win32-registry
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 061311fb260..4ef73c1cd1e 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -553,7 +553,7 @@ Objective-C and Objective-C++ Dialects}.
-masm=@var{dialect} -mno-fancy-math-387 @gol
-mno-fp-ret-in-387 -msoft-float @gol
-mno-wide-multiply -mrtd -malign-double @gol
--mpreferred-stack-boundary=@var{num} -mcx16 -msahf -mrecip @gol
+-mpreferred-stack-boundary=@var{num} -mcld -mcx16 -msahf -mrecip @gol
-mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -msse4 @gol
-maes -mpclmul @gol
-msse4a -m3dnow -mpopcnt -mabm -msse5 @gol
@@ -10814,6 +10814,20 @@ supported architecture, using the appropriate flags. In particular,
the file containing the CPU detection code should be compiled without
these options.
+@item -mcld
+@opindex mcld
+This option instructs GCC to emit a @code{cld} instruction in the prologue
+of functions that use string instructions. String instructions depend on
+the DF flag to select between autoincrement or autodecrement mode. While the
+ABI specifies the DF flag to be cleared on function entry, some operating
+systems violate this specification by not clearing the DF flag in their
+exception dispatchers. The exception handler can be invoked with the DF flag
+set which leads to wrong direction mode, when string instructions are used.
+This option can be enabled by default on 32-bit x86 targets by configuring
+GCC with the @option{--enable-cld} configure option. Generation of @code{cld}
+instructions can be suppressed with the @option{-mno-cld} compiler option
+in this case.
+
@item -mcx16
@opindex mcx16
This option will enable GCC to use CMPXCHG16B instruction in generated code.