Subject: libfloat

From: Mark Hatle <[email-masked]>
Date: Tue, 06 Jun 2000 19:47:05 -0700

I hope this is the correct place to ask...

I am working on compiling the toolchain for StrongArm.  I'm starting
with the Netwinder stuff, however I noticed that they were using an
external library (libfloat) instead of the built in gcc functions.

Is there a reason for this?  As far as I can tell all of the
architectures I am familiar with use the built in gcc soft floating
point.

Thanx!
--Mark

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]
++        Please use [email-masked] for           ++
++                        kernel-related discussions.                      ++

---

From: Scott Bambrough <[email-masked]>
Date: Wed, 07 Jun 2000 08:35:36 -0400

libfloat is only used when the -msoft-float flag is passed.  Otherwise the
compiler issues instructions for the FPA11 coprocessor for floating point.  This
requires the actual hardware, or an emulator such as the one Russell provides or
the NWFPE.

To use -msoft-float with gcc requires a library implementing the functions that
the gcc calls instead of using machine based floating point operations. 
libfloat implements this for ARM systems.  AFAIK, gcc has no implementation of
software floating point, and even if it did, I doubt it supports ARM doubles
correctly.

Scott

-- 
Scott Bambrough - Software Engineer
REBEL.COM    http://www.rebel.com
NetWinder    http://www.netwinder.org

---

From: Mark Hatle <[email-masked]>
Date: Wed, 07 Jun 2000 09:32:22 -0700

gcc has an internal floating point implementation located in libgcc.a
(if its enabled).  If you look at the gcc source in gcc/config/arm (the
various t-* files) you'll see that all of the other arm targets have the
"in-gcc" floating point enabled.  Linux is the only target that sets
hard-float, and uses an external floating point library if soft-float is
set.

I have made the changes on my copy of gcc to enable the in-gcc floating
point, however I have not yet run the tests to determine if it is
working correctly.  (It seems to be on a float at least, havn't tried a
double yet.)

I do not want to use the in kernel floating point emulator.  (Reasons
are varied, but it is not what I want to do..)  Once I get the gcc
working the way I want, I'm going to recompile the kernel and turn off
NWFPE, then I'll see if it's really working the way I think it should!

--Mark