This is the mail archive of the gcc@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: Should -msse3 enable fisttp


Richard Henderson wrote:
On Tue, Oct 04, 2005 at 10:07:31AM -0700, Dale Johannesen wrote:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23809

The patch in the PR looks reasonable.

I committed it after fixing some grammar problems.


Tested with `make info'.

Paolo
2005-10-05  Billy Biggs  <billy.biggs@gmail.com>
            Paolo Bonzini  <bonzini@gnu.org>

        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.

Index: extend.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/extend.texi,v
retrieving revision 1.267
diff -u -r1.267 extend.texi
--- extend.texi 22 Aug 2005 16:12:09 -0000      1.267
+++ extend.texi 5 Oct 2005 08:19:38 -0000
@@ -6466,6 +6466,14 @@
 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
Index: invoke.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/invoke.texi,v
retrieving revision 1.682
diff -u -r1.682 invoke.texi
--- invoke.texi 5 Oct 2005 00:35:53 -0000       1.682
+++ invoke.texi 5 Oct 2005 08:19:39 -0000
@@ -9261,15 +9261,20 @@
 @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


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