Subject: SoftFloat-2a import?
To: None <>
From: Ben Harris <>
List: tech-toolchain
Date: 05/22/2000 00:44:57
I've spent the last couple of weeks (when not doing Real Work or mending
laser printers) hammering the current version of SoftFloat into working
with NetBSD/arm26 and trying to work out how to import it sensibly into
NetBSD in a machine-independent manner.  The following issues are
currently worrying me:

 - It's been suggested that SoftFloat should be available as a library in
its own right, as well as being built into the guts of libc.  This seems
vaguely sensible (the libc version is a stripped-down and rather mangled
version of the real thing), but it seems like an odd thing to ship with an

 - The ARM is strange and stores the words of a double in big-endian order
despite being mostly little-endian.  I've hacked SoftFloat into workking
with this by inserting FLOAT64_MANGLE and FLOAT64_DEMANGLE (appropriately
defined) where necessary, but this is an ugly hack.  When not building as
part of libc, this is disabled, so TestFloat can check I've got this right
(I seem to have now).

 - The archives of this list seem to indicate that dynamically linking
against SoftFloat causes a huge performance hit.  This might make it worth
building it as a static library like libgcc.a.

 - SoftFloat currently ends up as one big object file, plus a couple of
files of glue.  It might be helpful if it were split up, but the number of
shared internal functions would make this an interesting exercise.  Is 17k
off every static executable that calls printf a big deal anyway?

 - At present on arm{32,26}, fpsetsticky and friends are defined in terms
of sfp_setsticky etc, which in turn look at SoftFloat's internal
variables.  I think the sfp_* versions should be renamed out of the user's
namespace, and probably dispensed with altogether.

 - TestFloat should probably be integrated into the tree somewhere.

Thoughts from the rest of the world on what I should be doing here would
probably be useful.  TIA.

Ben Harris                                                   <>
Portmaster, NetBSD/arm26               <URL:>