amd64/115581: [patch] -mfancy-math-387 has no effect

Simun Mikecin numisemis at
Tue Aug 21 05:40:07 PDT 2007

The following reply was made to PR amd64/115581; it has been noted by GNATS.

From: "Simun Mikecin" <numisemis at>
To: bug-followup at, brde at
Subject: Re: amd64/115581: [patch] -mfancy-math-387 has no effect
Date: Tue, 21 Aug 2007 14:12:29 +0200

 On Fri, 17 Aug 2007, Bruce Evans wrote:
 > It should not be used, especially on amd64 systems since basic FP
 > instructions are relatively fast compared with the fancy instructions
 > (except for sqrt). The 64-bit amd64 libm intentionally never uses the
 > fancy instructions (except for sqrt), partly because they are not much
 > faster and partly because they are much less accurate. The fancy
 > instructions are not used for float precision (unless you pessimize
 > things using -mfancy-math-387) since they are about 3 times slower
 > than the library versions on small args.
 This PR is about -mfancy-math-387 usage when compiling 32-bit  
 compatibility libraries that are gone be used on FreeBSD/amd64.
 As far as I can see FreeBSD's libm on i386 uses those fancy instructions  
 (for example /usr/src.current/lib/msun/i387/s_sin.S), so the same libm  
 will be used for running 32-bit apps on FreeBSD/amd64.
 Is your statement about fancy instructions been 3 times slower also valid  
 for FreeBSD/i386 and 32-bit apps running on FreeBSD/amd64?

More information about the freebsd-amd64 mailing list