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

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Mon Dec 3 22:00:26 UTC 2018


FloatMathPlugin is based on Sun microsystems fdlibm. This library does not
compile correctly on modern C compiler because it uses pointer aliasing to
access bits of a double as two int32. Nowadays, pointer aliasing is
undefined behavior. The same library was used in java and compiled with
special flags, but this is fragile. It is easy to replace this UB, but that
mean forking this now unmaintained code, unless we find another already
existing fork. No time to search now.

Le lun. 3 déc. 2018 à 22:31, Eliot Miranda <notifications at github.com> a
écrit :

>
>
> Hi Ben,
>
> ideally we'd have bit-identical FP on all platforms.  Currently this is only achievable using Andreas Raab's FloatMath plugin, used by Croquet and Terf, and not yet tested in 64-bits.  What that has to say about whether we support the default or 53-bit on x64 I don't know.  i guess we should for now simply support the default m ode.  In any case it's unlikely to make much difference because the computational model yields results being truncated to 53 bits after each operation (i.e. other than in the graphics subsystem, floating point operations are performed on double-precision floats so there's no scope for extended calculations to use 64-bit precision internally.  So feel free to include the above as commentary but I think we want to apply your pull request asap and so we should leave the precision argument for a later day when we have more data (such as a 64-bit Terf to test).
>
>> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/313#issuecomment-443877985>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AhLyW19NRT5NIHT-ZwfbaMs_Mn160JzRks5u1ZhKgaJpZM4Y84NR>
> .
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20181203/4092f953/attachment.html>


More information about the Vm-dev mailing list