[Fwd: Re: cygwin gcc compatibility with MSVC numerics]
Tim Prince
n8tm@aol.com
Mon Jul 27 07:47:00 GMT 2009
Leena.Padgaonkar@patni.com wrote:
> My basic problem is that the cygwin floating addition is giving
> different results than VS 2008 for certain float values .Both the
> environments are on the same PC. So I was wondering about the floating
> point format used in cygwin.
>
> Btw, the makefile which I am using are having following options
> OPTFLAGS = -I . -O3 -funroll-loops -mtune=pentium3 -ffast-math
> -mfancy-math-387
>
>
Only 64-bit Windows passes the same settings of x87 precision mode
(53-bit) and SSE abrupt underflow mode to both gcc and MSVC built .exe.
-ffast-math would not be recommended for similarity to MSVC build, where
none of the aggressive options would normally be in use. Only the
abrupt underflow setting matches MSVC.
If /Ox is set for MSVC, similar optimization should be obtained with gcc
-O3.
If you are looking for full performance, and don't need compatibility
with 10-year-old CPUs, you would normally set /fp:fast /arch:SSE2 in
MSVC, and corresponding -march=pentium-m -mfpmath=sse (or newer -march)
in gcc. If you don't set /arch:SSE2 /fp:fast in MSVC, you imply K&R
style promotion of certain float expressions to double, such as you get
with 387 math in gcc.
-------------- next part --------------
An embedded message was scrubbed...
From: Tim Prince <n8tm@aol.com>
Subject: Re: cygwin gcc compatibility with MSVC numerics
Date: Sun, 26 Jul 2009 12:18:03 -0700
Size: 2097
URL: <http://cygwin.com/pipermail/cygwin/attachments/20090727/21917050/attachment.eml>
-------------- next part --------------
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list