This bug was introduced by the mistake of my test program.
Last week, I talked about the probelm (my FATANH(-0) returns +0 ?)
by NetBSD seminar at Open Source Conference 2013 Hiroshima,
and tsutsui@ confirmed that returns -0.
o Prepare C version of BFFFO (from XM6i).
It is helpful in running FPE on other platforms (for example, for a
test). It is also helpful in porting to non-m68k 3rd party :)
o A BFFFO is supported on 68020 or later (though I'm not sure whether
sun2/68010 uses this FPE correctly or not).
o FETOX .. exp(x)
o FETOXM1 .. exp(x) - 1
o FTENTOX .. 10^x
o FTWOTOX .. 2^x
At last all mathematics functions of FPE were implemented.
Thanks to Yosuke Sugahara.
o sine and cosine (e.g., FSIN, FCOS and FSINCOS instructions) is now
calculated in the CORDIC instead of Taylor expansion.
o tangent (FTAN) is not touched from a viewpoint of the code size.
o The CORDIC is applicable for hyperbolic functions (e.g., FSINH,
FCOSH, FTANH instructions), but I didn't use it because its working
range is poor.
o The CORDIC is also usable for inverse trigonometric functions,
I will commit it at next phase.
o The code size becomes a bit big. I cannot evaluate speed on m68k
for some reasons, but in test on i386 the CORDIC is approximately
100 times faster in sin/cos.
Update not only exponential but also mantissa when an integer part
becomes 2 by rounding up. Without this fix, the extended precision
value becomes 0.0 because mantissa (including explicit integer bit)
is all-zero.
Especially, remove the special treatment when |x| < 1
because it forgets to consider FPCR round mode.
See PR/46627 for the detail. Thanks Y.Sugahara for advice.
fpu_upd_fpsr() should be called even in discard_result case if an emulated
instruction gets proper result without signal.
Fixes weird behavior of awk(1) seen on /etc/rc.d/postfix on XM6i and
TME emulating sun3 without 68881.
Should be pulled up to all netbsd-4 and netbsd-5 branches.
M680[12346] are now available from opt_m68k_arch.h. FPSP meantioned
in the PR has already been fixed, and i could not find any more.
i built these kernels to ensure i did not break their builds:
amiga: GENERIC DRACO
atari: HADES FALCON MILAN-PCIIDE
mac68k: GENERIC
sun2: GENERIC
sun3: GENERIC GENERIC3X
cesfic: attempted GENERIC, does not build due to lack of machine/bus.h
hp300: GENERIC
luna68k: GENERIC
mvme68k: GENERIC
news68k: GENERIC
next68k: GENERIC
x68k: GENERIC