This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [PATCH] Implement __abs?f2 functions in soft-fp
- From: Roger Sayle <roger at eyesopen dot com>
- To: Geoff Keating <geoffk at geoffk dot org>
- Cc: <libc-alpha at sources dot redhat dot com>
- Date: Sat, 2 Nov 2002 20:43:30 -0700 (MST)
- Subject: Re: [PATCH] Implement __abs?f2 functions in soft-fp
Hi Geoff,
> > When compiling on a processor without an FPU, such as H8300, or
> > even x86 with "-msoft-float -mno-ret-in-387", GCC emits code that
> > contains calls to a suitable software floating point library.
> > These generic routines are not part of libgcc, and on most platforms
> > aren't part of glibc by default.
>
> This is not correct. If -ffree-standing is specified then GCC
> should not assume that libm routines are available.
I think you misunderstand. With "-msoft-float", GCC emits libcalls
to functions such as __gtsf2 or __adddf3. These functions are very
different to those in libm. As I've explained in a earlier post,
-ffree-standing is one reason why GCC can't emit calls to "fabs"
instead of "__absdf2" (i.e. it can't assume the availability of a
standard C library, but it can assume the existance of libgcc?).
Roger
--