[PATCH] Implement __abs?f2 functions in soft-fp

Roger Sayle roger@eyesopen.com
Sat Nov 2 19:58:00 GMT 2002


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
--



More information about the Libc-alpha mailing list