This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: soft-fp patch: New functions for newer GCC
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Roland McGrath <roland at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 5 Jan 2006 12:47:00 +0000 (UTC)
- Subject: Re: soft-fp patch: New functions for newer GCC
- References: <20060105093357.BFF8C180B7C@magilla.sf.frob.com>
On Thu, 5 Jan 2006, Roland McGrath wrote:
> > The soft-fp code provides the functions to which GCC could generate calls
> > when it was contributed in 1999. Newer versions of GCC can generate calls
> > to more soft-float functions, __unord* and __floatun*.
>
> Can you give some more precise information about which GCC versions
> generate the new calls and on which machines? The only libc configurations
> that use those variables and would be affected are powerpc --without-fpu,
> from what I can see. (Other configurations use the soft-fp macros in their
> own entry points by other names, for whatever reason.) The existing
> powerpc --without-fpu configuration puts the old entry points in the
> GLIBC_2.3.2 set. To add these entry points to libc, they must be added to
> a new version set for any configurations that will use them.
Calls to __unord* are generated by GCC 3.0 and later for any soft-float
target. Calls to __floatun* are generated by GCC 4.2 (i.e. current
mainline) and later for any soft-float target, but also for hard-float
targets in some cases (e.g. __floatundi*).
I agree with the assessment that only powerpc --without-fp uses the .c
files from soft-fp though other targets use the headers. In general the
required functions are always provided by libgcc but without exception or
rounding mode support there (whereas in libc they have exception and
rounding mode support, which requires cooperation with the <fenv.h>
functions). I've been looking at the possibility of using the glibc
functions as a better replacement for the existing soft-float functions in
libgcc - hence these patches to bring them up to what would be needed for
use in libgcc. (There would then be the question of where, glibc or GCC,
the master copy of the code goes. This code is also used in the Linux
kernel. The __sqrt* functions will never be used by GCC but they may be
of use in kernel math emulation.)
--
Joseph S. Myers
joseph@codesourcery.com