Re: [hatari-devel] Functional tester for 68881/2 FPUs

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


> Toni, is it possible to get an exact behaviour like 68881/2 fpu with
> those asm calls, or did you measure a percentage of accuracy compared to
> default settings of the host's FPU ?

I haven't really bothered with measuring it. It should be accurate
enough if host FPU rounding mode is correct (at least if 6888x extended
precision is not used).

Assembly may not be needed if OS has API call that can be used to change
both host FPU rounding and precision mode.

Assembly is needed in WinUAE because JIT adds some extra requirements: C
code uses C-library arithmetic functions that use SSE+ instructions but
JIT only uses x87 FPU instructions (someone probably should update JIT
someday..) and of course rounding/precision setting function only sets
SSE mode... Both have separate rounding and precision settings. It
caused really unexpected results when they didn't match after switching
to newer compiler.. (Note, MSVC does this, GCC may do something else)

FPU code also has unfinished softfload mode that should result in 100%
accurate (and very slow) results, including arithmetic exceptions (that
no one seems to use, at least any Amiga software).




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/