Leena.Padgaonkar@xxxxxxxxx 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.
--- Begin Message ---
Leena.Padgaonkar@xxxxxxxxx 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.
--- Begin Message ---
Leena.Padgaonkar@xxxxxxxxx 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.
--- End Message ---
--
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
--- End Message ---