[prev in list] [next in list] [prev in thread] [next in thread]
List: netbsd-tech-userlevel
Subject: Softfloat millicode
From: Taylor R Campbell <campbell+netbsd-tech-userlevel () mumble ! net>
Date: 2018-11-24 22:36:36
Message-ID: 20181124223636.CA1E160C51 () jupiter ! mumble ! net
[Download RAW message or body]
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/floatsit=
f.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?
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic