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

GHC ghc-devs at haskell.org
Thu Dec 15 15:43:17 UTC 2016


#7289: Mingw FPU init not Windows compatible.
-------------------------------------+-------------------------------------
        Reporter:  Lennart           |                Owner:  Phyx-
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:  8.2.1
       Component:  Runtime System    |              Version:  7.2.2
      Resolution:                    |             Keywords:
Operating System:  Windows           |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D2819
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"6f7d8279cea4aa1082fb07adf5da507297e21ee8/ghc" 6f7d827/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="6f7d8279cea4aa1082fb07adf5da507297e21ee8"
 Reset FPU precision back to MSVCRT defaults

 Mingw-w64 does a stupid thing. They set the FPU precision to extended
 mode by default.  The reasoning is that it's for compatibility with GNU
 Linux ported libraries. However the problem is this is incompatible with
 the standard Windows double precision mode.  In fact, if we create a new
 OS thread then Windows will reset the FPU to double precision mode.  So
 we end up with a weird state where the main thread by default has a
 different precision than any child threads.

 Test Plan: ./validate new test T7289

 Reviewers: simonmar, austin, bgamari, erikd

 Reviewed By: simonmar

 Subscribers: thomie, #ghc_windows_task_force

 Differential Revision: https://phabricator.haskell.org/D2819

 GHC Trac Issues: #7289
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7289#comment:12>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list