Patchwork [doc] Fix -mno-fancy-math-387

login
register
mail settings
Submitter Gerald Pfeifer
Date Feb. 16, 2011, 1:12 a.m.
Message ID <alpine.LFD.2.02.1102160204130.2792@ybpnyubfg6.ybpnyqbznva6>
Download mbox | patch
Permalink /patch/83321/
State New
Headers show

Comments

Gerald Pfeifer - Feb. 16, 2011, 1:12 a.m.
The documentation indicates that -mno-fancy-math-387 is the default
on FreeBSD, yet I do not see any code actually implementing that, and
I verified that the following

  #include <math.h>

  double f(double d) {
    return __builtin_sin(d);
  }

did generate fsin with -ffast-math as the only option.

Richard, http://gcc.gnu.org/ml/gcc-patches/2002-03/msg02001.html was
the last time someone really made changes in this area, though the
reference to FreeBSD predates your patch where you added OpenBSD and
NetBSD for both of which I _do_ see code in config/i386 to that extent,
unlike FreeBSD.

Am I missing something obvious, or is the patch below okay?

Gerald


2011-02-16  Gerald Pfeifer  <gerald@pfeifer.com>

	PR target/37072
	* doc/invoke.texi (i386 and x86-64 Options): -mno-fancy-math-387
	is not actually the default on FreeBSD.
	Uppercase CPU.

Patch

Index: doc/invoke.texi
===================================================================
--- doc/invoke.texi	(revision 170120)
+++ doc/invoke.texi	(working copy)
@@ -12273,9 +12273,9 @@ 
 @opindex mno-fancy-math-387
 Some 387 emulators do not support the @code{sin}, @code{cos} and
 @code{sqrt} instructions for the 387.  Specify this option to avoid
-generating those instructions.  This option is the default on FreeBSD,
+generating those instructions.  This option is the default on
 OpenBSD and NetBSD@.  This option is overridden when @option{-march}
-indicates that the target cpu will always have an FPU and so the
+indicates that the target CPU will always have an FPU and so the
 instruction will not need emulation.  As of revision 2.6.1, these
 instructions are not generated unless you also use the
 @option{-funsafe-math-optimizations} switch.