From 965f5423cdab8320a22279d1e84bd3294d235184 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Fri, 14 Dec 2001 12:20:27 +0100 Subject: i386.c (ix86_fpmath, [...]): New. Fri Dec 14 12:05:14 CET 2001 Jan Hubicka * i386.c (ix86_fpmath, ix86_fpmath_string): New. (override_option): Set ix86_fpmath. * i386.h (MASK_MIX_SSE_I387): Remove. (TARGET_SSE_MATH): New. (TARGET_MIX_SSE_I387): Use ix86_fpmath. (TARGET_SWITCHES): Remove "mix-sse-i387". (fpmath_unit): New enum. (ix86_fpmath, ix86_fpmath_string): Declare. * i386.md (swapsf): Fix condition. (add?f, sub?f, mul?f, div?f, sqrt?f, min?f): Use TARGET_SSE_MATH. (fp_?f_*_nosse): New. (fp_*): Use TARGET_SSE_MATH. * invoke.texi (-mfpmath): Document. (-msse2): Add. From-SVN: r47999 --- gcc/doc/invoke.texi | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) (limited to 'gcc/doc') diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 91fe9bc..03def55 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -473,12 +473,12 @@ in the following sections. @emph{i386 and x86-64 Options} @gccoptlist{ --mcpu=@var{cpu-type} -march=@var{cpu-type} @gol +-mcpu=@var{cpu-type} -march=@var{cpu-type} -mfpmath=@var{unit} @gol -mintel-syntax -mieee-fp -mno-fancy-math-387 @gol -mno-fp-ret-in-387 -msoft-float -msvr3-shlib @gol -mno-wide-multiply -mrtd -malign-double @gol -mpreferred-stack-boundary=@var{num} @gol --mmmx -msse -m3dnow @gol +-mmmx -msse -msse2 -msse-math -m3dnow @gol -mthreads -mno-align-stringops -minline-all-stringops @gol -mpush-args -maccumulate-outgoing-args -m128bit-long-double @gol -m96bit-long-double -mregparm=@var{num} -momit-leaf-frame-pointer @gol @@ -7513,6 +7513,48 @@ These options are synonyms for @option{-mcpu=i386}, @option{-mcpu=i486}, @option{-mcpu=pentium}, and @option{-mcpu=pentiumpro} respectively. These synonyms are deprecated. +@item -mfpmath=@var{unit} +@opindex march +generate floating point arithmetics for selected unit @var{unit}. the choices +for @var{unit} are: + +@table @samp +@item 387 +Use the standard 387 floating point coprocessor present majority of chips and +emulated otherwise. Code compiled with this option will run almost everywhere. +The temporary results are computed in 80bit precesion instead of precision +specified by the type resulting in slightly different results compared to most +of other chips. See @option{-ffloat-store} for more detailed description. + +This is the default choice for i386 compiler. + +@item sse +Use scalar floating point instructions present in the SSE instruction set. +This instruction set is supported by Pentium3 and newer chips, in the AMD line +by Athlon-4, Athlon-xp and Athlon-mp chips. The earlier version of SSE +instruction set supports only single precision arithmetics, thus the double and +extended precision arithmetics is still done using 387. Later version, present +only in Pentium4 and the future AMD x86-64 chips supports double precision +arithmetics too. + +For i387 you need to use @option{-march=@var{cpu-type}}, @option{-msse} or +@option{-msse2} switches to enable SSE extensions and make this option +effective. For x86-64 compiler, these extensions are enabled by default. + +The resulting code should be considerably faster in majority of cases and avoid +the numerical instability problems of 387 code, but may break some existing +code that expects temporaries to be 80bit. + +This is the default choice for x86-64 compiler. + +@item sse,387 +Attempt to utilize both instruction sets at once. This effectivly double the +amount of available registers and on chips with separate execution units for +387 and SSE the execution resources too. Use this option with care, as it is +still experimental, because gcc register allocator does not model separate +functional units well resulting in instable performance. +@end table + @item -mintel-syntax @opindex mintel-syntax Emit assembly using Intel syntax opcodes instead of AT&T syntax. @@ -7663,6 +7705,8 @@ preferred alignment to @option{-mpreferred-stack-boundary=2}. @itemx -mno-mmx @item -msse @itemx -mno-sse +@item -msse2 +@itemx -mno-sse2 @item -m3dnow @itemx -mno-3dnow @opindex mmmx -- cgit v1.1