Re: [hatari-devel] FPU update |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Le 08/01/2017 à 13:56, Toni Wilen a écrit :
- Adds an option to use software floating point arithmetics (via
SoftFloat library) - Fixes lots of bugs, mostly related to rounding
and normalization. At least one rounding bug was critical (crashed
Mac OS from many applications) - Improved handling of the FPSR
register, although this needs more testing and comparing to real
systems
Thanks. Looks more cleaner (and much more functional, I don't have any
good Amiga test cases) than my original and not really finished
softfloat support.
But I really want to have "normal" and softfloat FPU emulation on the
fly switchable (not compile time), I moved your new low level functions
back to fpu.cpp and combined both modes.
I can do testing if needed, I have 68030+68882, 68040 and 68060 based
Amigas. I don't have any 68881 systems.
Hi
I committed Andreas's changes that Toni merged into WinUAE to Hatari
devel version ; note that in Hatari there's no setting yet to switch
between "normal" and softfloat version, but at least everything compiles
fine (ie softfload is not used yet)
I saw a few warning in fpp.c :
To clear fxsizes, we should use :
static floatx80 fxsizes[6] = { { 0 } };
instead of
static floatx80 fxsizes[6] = { 0 };
Some printf warnings :
/home/npomarede/src/hatari-cpu/src/cpu/fpp.c: In function 'fp_print':
/home/npomarede/src/hatari-cpu/src/cpu/fpp.c:723:4: attention : format
'%Le' expects argument of type 'long double', but argument 4 has type
'double' [-Wformat=]
_stprintf(fs, _T("%c%#.17Le%s%s"), n?'-':'+', (fptype) 0.0, u ?
_T("U") : _T(""), d ? _T("D") : _T(""));
^
/home/npomarede/src/hatari-cpu/src/cpu/fpp.c:737:4: attention : format
'%Le' expects argument of type 'long double', but argument 4 has type
'fptype' [-Wformat=]
_stprintf(fs, _T("%c%#.17Le%s%s"), n?'-':'+', result, u ? _T("U") :
_T(""), d ? _T("D") : _T(""));
This is because Andreas' patch also set USE_LONG_DOUBLE, so %Le is OK.
But in WinUAE sources, USE_LONG_DOUBLE is not set, so fptype will just
be "double", hence the warning.
Should we use long double ?
Also, winuae has a file "include/fpp-softfloat.h", but it's never
included, it seems the code was moved directly in fpp.c ?
Nicolas