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
Showing
- rts/RtsStartup.c 30 additions, 4 deletionsrts/RtsStartup.c
- testsuite/tests/rts/T7289/Makefile 3 additions, 0 deletionstestsuite/tests/rts/T7289/Makefile
- testsuite/tests/rts/T7289/T7289.hs 9 additions, 0 deletionstestsuite/tests/rts/T7289/T7289.hs
- testsuite/tests/rts/T7289/T7289.stdout 2 additions, 0 deletionstestsuite/tests/rts/T7289/T7289.stdout
- testsuite/tests/rts/T7289/all.T 6 additions, 0 deletionstestsuite/tests/rts/T7289/all.T
- testsuite/tests/rts/T7289/fp.c 26 additions, 0 deletionstestsuite/tests/rts/T7289/fp.c
Loading
Please register or sign in to comment