tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
fenv for softfloat
hi folks,
the patch at the URL below fixes the libm fenv.h interfaces on
softfloat platforms. (currently on sh3, m68k, mips, and powerpc
the softfloat fenv implementation is actually hardfloat.)
http://ftp.netbsd.org/pub/NetBSD/misc/chs/diff.fenv-softfloat.4
here's what I have for a commit message:
----------
provide a common softfloat fenv implemenation and use it for softfloat builds.
restore ABI compatibility with previous releases for ieeefp.h on sh3.
add namespace.h protection for all the fenv interfaces.
use MKSOFTFLOAT on sh3 instead of assuming softfloat.
standardize on comparing MKSOFTFLOAT with "no".
remove the arm-specific softfloat fenv code (which also had several bugs).
fix logic errors in the arm hardfloat feraiseexcept() and feupdateenv().
----------
does anyone see any problem with this patch?
if not I'll commit in a few days.
I have tested this patch on quite a few combinations of platforms,
though I skipped some where we don't have a softfloat build:
fenv softfloat
arm good
arm libc_vfp bad - lib doesn't use hardware round/except state
m68k ? - libgcc_s.so is linked before libc.so
mips good
powerpc good
sh3 good
fenv softfloat - old test binary, new libs
arm good
arm libc_vfp bad - lib doesn't use hardware round/except state
m68k ? - libgcc_s.so is linked before libc.so
mips ? - no old bins
powerpc ? - no old bins
sh3 good
fenv hardfloat
alpha
amd64 good
arm good
hppa
i386 good
ia64
m68k good
mips good
powerpc good
sparc
sparc64
vax
fenv hardfloat - old test binary, new libs
arm good
m68k good
mips good
powerpc ? - t_fpsetmask failures, same with old libs
finally, here are some more FP problems that this patch does not fix:
- m68k softfloat doesn't build because of the dueling softfloat
implementations in libgcc vs. libc.
- the arm libc_vfp.so (which provides hardfloat implementations of functions
using the softfloat ABI) needs to replace the functions which access
the rounding and exception state with ones that access the hardware version
of those. it looks like the mips libc_fp.so has the same issue.
- the softfloat rounding and exception state is global to the process
rather than being per-thread as it should be.
I plan to get back to these eventually, but I wanted to be sure to get
my existing changes in for netbsd-8.
-Chuck
Home |
Main Index |
Thread Index |
Old Index