[GHC] #7289: Mingw FPU init not Windows compatible.
GHC
cvs-ghc at haskell.org
Tue Oct 2 13:35:10 CEST 2012
#7289: Mingw FPU init not Windows compatible.
--------------------------+-------------------------------------------------
Reporter: Lennart | Owner:
Type: bug | Status: new
Priority: normal | Component: Runtime System
Version: 7.2.2 | Keywords:
Os: Windows | Architecture: x86
Failure: None/Unknown | Testcase:
Blockedby: | Blocking:
Related: |
--------------------------+-------------------------------------------------
Mingw initializes the FPU top 80 bit precision instead of MSVC's 53 bits
(which is the standard). I suggest ghc linking on Windows should be
changed to that it uses 53 bits instead. This will make programs more
Windows compatible (and possibly faster).
Here's a comment from Mingw's Float.h:
/*
MSVCRT.dll _fpreset initializes the control register to 0x27f,
the status register to zero and the tag word to 0FFFFh.
This differs from asm instruction finit/fninit which set control
word to 0x37f (64 bit mantissa precison rather than 53 bit).
By default, the mingw version of _fpreset sets fp control as
per fninit. To use the MSVCRT.dll _fpreset, include CRT_fp8.o when
building your application.
*/
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7289>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list