* [Fwd: [Fwd: Re: cygwin gcc compatibility with MSVC numerics]]
@ 2009-07-26 19:56 Tim Prince
0 siblings, 0 replies; only message in thread
From: Tim Prince @ 2009-07-26 19:56 UTC (permalink / raw)
To: gcc-help, cygwin
[-- Attachment #1: Type: text/plain, Size: 1211 bytes --]
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.
[-- Attachment #2: [Fwd: Re: cygwin gcc compatibility with MSVC numerics].eml --]
[-- Type: message/rfc822, Size: 7678 bytes --]
[-- Attachment #2.1.1: Type: text/plain, Size: 1219 bytes --]
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.
[-- Attachment #2.1.2: Re: cygwin gcc compatibility with MSVC numerics.eml --]
[-- Type: message/rfc822, Size: 2060 bytes --]
From: Tim Prince <n8tm@aol.com>
To: Leena.Padgaonkar@patni.com
Subject: Re: cygwin gcc compatibility with MSVC numerics
Date: Sun, 26 Jul 2009 12:18:03 -0700
Message-ID: <4A6CABEB.4000701@aol.com>
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.
[-- Attachment #2.1.3: Type: text/plain, Size: 219 bytes --]
--
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-07-26 19:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-26 19:56 [Fwd: [Fwd: Re: cygwin gcc compatibility with MSVC numerics]] Tim Prince
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).