Subject: Re: shocking speed performance!
To: None <kim@pvv.ntnu.no>
From: Richard Earnshaw <rearnsha@arm.com>
List: port-arm32
Date: 05/21/1999 13:54:04
> > kim@pvv.ntnu.no said:
> You put math functions in libc?
I didn't put them anywhere.
Normally a gcc implementation would put them in libgcc.a, since they are
support libraries for a compiler implementation. The NetBSD implementors
chose to place most of the functions from that library in libc.so
(presumably to simplify shared library handling for the common case). I
had nothing to do with that decision; I'm not entirely happy with it, but
I have to live with it.
> That is the wrong place.
> Math functions should be in the math libraries.
These functions are low-level compiler-generated routines which happen to
be needed to support the base floating point implementation. The have a
parallel to the division and modulo support functions that are required
for many RISC processors (including the ARM). They do not belong in a
user-linked library (such as libm), which is only linked in at the option
of the user.
> On some platforms there are several math libraries, with different
> properties.
Not usually for the low-level functionality we are talking about here.
>
> Putting math in libc makes things messy.
> Why not put it where it belongs?
See above. Changing it is, unfortunately, far from trivial.
> Also as mentioned earlier, I worked 3 months of evenings on this project
> some years ago, and was stopped by uncompilable gcc. I have told you
> about this project several times before in these years.
>
But this is clearly not true. Numerous people successfully compile the
standard gcc and egcs distributions in addition to the in-tree NetBSD
copy. Just saying it is not compilable doesn't help us to help you (we
aren't psychic).