[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] gmp test fails



I haven't had time to post today at all (taking a break from computer security spreadsheet hell @ work today at the moment).

Here is a working GMP from March 2009:

http://www.radix.net/~atari/mint/gmp-4.2.4-1.m68kmint.rpm

All tests passed (this was when Vincent fixed some MiNTLin issues brought up from tests failing), and I was able to assemble this into an RPM. I "think" this was linked against fdlibm on my CT60 Falcon, but I need to check it out this weekend hopefully. It definitely was built with the default parameters, so it was targeted at 68000/msoft-float.

Building with GCC 4.4.2 / BinUtils 2.20 / CVS MiNTLib for Oct gets me 13 errors in the mpz tests (after fixng stacks for a couple), and that is as far as I have gotten with this. Basically did that last night.

Don't think I really shared too much. I was going to switch from fdlibm to pml and retry the build, maybe tonight.

Keith

On Thu, 14 Jan 2010, Vincent Rivière wrote:

Miro Kropacek wrote:
    fdlibm or pml ?

default from easymint, i.e. fdlibm I guess.

This is what I feared from a long time... the libm issues.

Originally I used PML because I was not aware of fdlibm. As it seemed to be quite OK, I never made the effort to switch to fdlibm (yet).

When I made the objstack patch, I'm pretty sure all the tests had passed for 68000. I had compiled them with the cross-compiler and PML, then I ran them on ARAnyM through the hostfs.

I'm not sure, but I may have tried the 68020-60 version and there was failures... I don't remember well. However, I'm not sure if all the floating-point implementations are strictly equivalent, maybe there are some roundings approximations... However the gmp tests are certainly aware of that.

Some time ago I have compiled the latest POV-Ray for MiNT. I used my cross-gcc and PML, as usual. The 68000 and ColdFire version works perfectly (but PML sometimes print warnings on the screen !). The 68020-60 version produces images with very wrong colors.

POV-Ray and GMP are good examples because they heavily use the floating point functions.

Note there is a particularity on GCC for m68k. On 68000 and ColdFire, the floats are returned in d0 as usual. But on 68020+, they are returned in the FPU register fp0 ! If all the libraries are compiled with the same options and the same compiler, there is no problem. But this certainly a source of problems, and I'm sure it is the case for POV-Ray. However I have not yet investigated this issue. Note that this odd return value behaviour was here in GCC 2.95.3 for MiNT, and I kept it in GCC 4.x.

I don't know if all these problems are related.

There are not so much functions in the libm, we should make some basic tests manually, then it would be good to find a testsuite.

About the math libraries, there is one in Newlib, however I don't know if it is as much optimized as fdlibm.

--
Vincent Rivière