[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Fixes for 64-bit MSVC minheadless build (#313)

Eliot Miranda notifications at github.com
Sun Dec 2 18:24:41 UTC 2018


Hi Ben,

   put the definitions at the top of the file or at the first occurrence of _controlfp as you see fit.  It does look as if we can ignore _MCW_IC.  _MCW_PC on the other hand is vital.  If the VM called foreign code though the FFI and that foreign code changed the _MCW_PC mode before calling back, unless the callback entry code resets the fp mode back to the default, the VM's floating point results would be incorrect.  Essentially callbacks must reinitialize the processor so that it functions as expected on each callback in case foreign code puts the processor into some other mode.  With simple processors this isn't an issue but with the x86 it is.

An alternative may be to jettison the entire use of _controlfp if we can be convinced that the VM only makes use of SSE instructions to implement floating point.  That's the case with the JIT floating point code.  And we use -SSE3 flags on all compilers I'm aware of.  If we go this route I would still include the _controlfp code, surrounded by #if 0 ... #endif, simply to document the issue.

-- 
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/313#issuecomment-443530325
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20181202/b314606e/attachment.html>


More information about the Vm-dev mailing list