From 0e6c8ad0b1b5de9b0faebc17a47511303db35531 Mon Sep 17 00:00:00 2001 From: bonzini Date: Wed, 5 Oct 2005 08:27:44 +0000 Subject: [PATCH] 2005-10-05 Billy Biggs Paolo Bonzini PR target/23809 * doc/extend.texi (x86 Built-ins): Document that -msse and friends enable the instructions and not just the built-ins. * doc/invoke.texi (x86 Options): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104979 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 9 +++++++++ gcc/doc/extend.texi | 8 ++++++++ gcc/doc/invoke.texi | 19 ++++++++++++------- 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3ac24ec..24f14e9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2005-10-05 Billy Biggs + Paolo Bonzini + + PR target/23809 + + * doc/extend.texi (x86 Built-ins): Document that -msse and friends + enable the instructions and not just the built-ins. + * doc/invoke.texi (x86 Options): Likewise. + 2005-10-04 Geoffrey Keating * config/i386/t-darwin (SHLIB_VERPFX): Fix typo. diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 0d2f653..71518e4 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -6466,6 +6466,14 @@ into the data cache. The instruction will be issued in slot I1@. These built-in functions are available for the i386 and x86-64 family of computers, depending on the command-line switches used. +Note that, if you specify command-line switches such as @option{-msse}, +the compiler could use the extended instruction sets even if the built-ins +are not used explicitly in the program. For this reason, applications +which perform runtime CPU detection must compile separate files for each +supported architecture, using the appropriate flags. In particular, +the file containing the CPU detection code should be compiled without +these options. + The following machine modes are available for use with MMX built-in functions (@pxref{Vector Extensions}): @code{V2SI} for a vector of two 32-bit integers, @code{V4HI} for a vector of four 16-bit integers, and @code{V8QI} for a diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 3e4af30..b859a7f 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -9261,15 +9261,20 @@ preferred alignment to @option{-mpreferred-stack-boundary=2}. @opindex mno-sse @opindex m3dnow @opindex mno-3dnow -These switches enable or disable the use of built-in functions that allow -direct access to the MMX, SSE, SSE2, SSE3 and 3Dnow extensions of the -instruction set. - -@xref{X86 Built-in Functions}, for details of the functions enabled -and disabled by these switches. +These switches enable or disable the use of instructions in the MMX, +SSE, SSE2 or 3DNow! extended instruction sets. These extensions are +also available as built-in functions: see @ref{X86 Built-in Functions}, +for details of the functions enabled and disabled by these switches. To have SSE/SSE2 instructions generated automatically from floating-point -code, see @option{-mfpmath=sse}. +code (as opposed to 387 instructions), see @option{-mfpmath=sse}. + +These options will enable GCC to use these extended instructions in +generated code, even without @option{-mfpmath=sse}. Applications which +perform runtime CPU detection must compile separate files for each +supported architecture, using the appropriate flags. In particular, +the file containing the CPU detection code should be compiled without +these options. @item -mpush-args @itemx -mno-push-args -- 2.7.4