#4391: forkIO threads do not properly save/restore the floating point 
environment
---------------------------------+------------------------------------------
    Reporter:  draconx           |        Owner:              
        Type:  bug               |       Status:  new         
    Priority:  normal            |    Milestone:  7.2.1       
   Component:  Runtime System    |      Version:  6.12.3      
    Keywords:                    |     Testcase:              
   Blockedby:                    |   Difficulty:              
          Os:  Unknown/Multiple  |     Blocking:              
Architecture:  x86_64 (amd64)    |      Failure:  None/Unknown
---------------------------------+------------------------------------------

Comment(by duncan):

 I've occasionally thought about what it would take to do full IEEE
 floating point in Haskell. Assuming one can come up with a high level pure
 API (e.g. modeling rounding mode etc as extra input parameters) then the
 next big problem is at the ABI / codegen layer. With lazy evaluation
 you're calling unknown functions all the time and these expect the default
 FP state. I think you'd have to make the FP state part of the function
 call ABI. That is, for normal calls to normal functions you'd have to
 save/restore the FP state around the call. For functions that take the
 rounding/exception mode as a parameter then you can call them without
 save/restore. The danger is that it'd be rather expensive.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4391#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to