Re: [GHC] #7289: Mingw FPU init not Windows compatible.

#7289: Mingw FPU init not Windows compatible. -----------------------------------+-------------------------------- Reporter: Lennart | Owner: Type: bug | Status: upstream Priority: normal | Milestone: 8.2.1 Component: Runtime System | Version: 7.2.2 Resolution: | Keywords: Operating System: Windows | Architecture: x86 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -----------------------------------+-------------------------------- Changes (by bgamari): * status: new => upstream * milestone: 8.0.1 => 8.2.1 Old description:
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. */
New description: 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: {{{#!c /* 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://ghc.haskell.org/trac/ghc/ticket/7289#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC