Port-arm archive

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

Softfloat millicode



We seem to have three versions of various softfloat millicode routines
like __floatsitf which converts int32_t to long double:

- libgcc, e.g. external/gpl3/gcc/dist/libgcc/soft-fp/floatsitf.c
- libc, e.g. lib/libc/arch/softfloat/qp.c
- compiler-rt, e.g. sys/external/bsd/compiler_rt/dist/lib/builtins/floatsitf.c

It turns out that libc's __floatsitf -- and probably others -- is
broken on aarch64: it seems to get the two halves of float128
reversed.

This has the confusing side effect that code using long double and
__floatsitf in an executable works fine but code in a shared library
-- exactly the same code! -- gets nonsense results.

I would like to fix this.  But I'm not sure how to proceed.  What
should we do?

- What should we do?
- Why do we have multiple versions of these routines?
- Which ones should we keep and which ones should we discard?
- Should we keep them all and just fix aarch64's code in libc?
- What relies on the symbols provided by each context and what would
  break if we removed some of them?


Home | Main Index | Thread Index | Old Index