Hi All, Evaluating any of the three lines below will make the VM (64-bit 3684 on linux) crash: FloatMathPluginTests basicNew cos: -7.384669756559583e-194 FloatMathPluginTests basicNew sin: -7.384669756559583e-194 FloatMathPluginTests basicNew tan: -7.384669756559583e-194 There's no crash with the 32-bit VM. Levente |
Hi Levente, I have forgotten where do we load the FloatMathPluginTests from?http://lists.squeakfoundation.org/pipermail/vm-dev/2010-December/006302.html http://lists.squeakfoundation.org/pipermail/squeak-dev/2013-February/168890.html http://lists.squeakfoundation.org/pipermail/vm-dev/2010-December/006350.html http://lists.squeakfoundation.org/pipermail/vm-dev/2010-December/006352.html 2016-05-10 23:52 GMT+02:00 Levente Uzonyi <[hidden email]>:
|
Hi Nicolas,
On Tue, May 10, 2016 at 11:19 PM, Nicolas Cellier <[hidden email]> wrote:
It's in VMMaker and VMMaker.oscog.
It could be, but the issue is 64-bits only, and the optimised version seems to work fine on 32-bits except for three functions, see platforms//win32/plugins/FloatMathPlugin/Makefile: # Special OFLAGS for some files k_tan.o: k_tan.c $(MAKE) -f ../../Makefile.plugin OFLAGS="-O0" $*.o acos.o: acos.c $(MAKE) -f ../../Makefile.plugin OFLAGS="-O0" $*.o tanh.o: tanh.c $(MAKE) -f ../../Makefile.plugin OFLAGS="-O0" $*.o
Right. So I will add the equivalent if it exists in clang.
I *think* that none of the aliasing would be required if the code were rewritten to use a 64-bit integer datatype (long long) to hold doubles. Looks to me that everything was written before long long; the tables of 64-bit floating-point constants are split into 32-bit halves, etc. But it's a lot of work to rewrite. I wonder whether there are other open source communities interested in collaborating on this. Also, how much work would it be to write an equivalent library using Slang? Anyone know if a company like Google or Facebook would have the resources to fund a replacement? It looks to be less than a months work by someone competent, perhaps a week. Also are there any tests? I've not been able to find them. It's incredible that much of the industry is replying on an old and inefficient version of such critical functionality.
IMO, better would be to include sqConfg.h. A "clean" way to do this is to rename fdlibm.h to e.g. realfdlibm.h and have a new fdlibm.h that includes sqConfig.h, defines __LITTLE_ENDIAN in terms of VMBIGENDIAN and then includes realfdlibm.h
_,,,^..^,,,_ best, Eliot |
Free forum by Nabble | Edit this page |