Subject: soft float

From: Philip Blundell <[email-masked]>
Date: Sat, 18 Jul 1998 18:48:09 +0100

Hi,

I've put together a trial version of a soft-float library for Linux/ARM.  I'm
making it available at

	http://www.tazenda.demon.co.uk/phil/armlinux/libfloat-980718.tar.gz

for anybody who wants to try.  It's based on John R. Hauser's `SoftFloat' 
library, and most of the credit for it should go to him and to Mark and Neil 
of Causality who did the original ARM port for NetBSD.

The way 64-bit values are handled is not at all pretty, but it seems to work 
though I haven't done any serious testing yet.  To use it, you need to compile 
the library (edit Makefile-linux to select the appropriate options, then just 
type `make -f Makefile-linux'), then build your programs with -msoft-float 
and arrange for libfloat.a to be included in the final link.  If you want to 
use floating point facilities in the C library (eg printf or the math 
routines) then you must recompile libc itself with -msoft-float.  If you use 
glibc, you should configure with the --without-fp flag to inhibit the code 
that directly manipulates FP registers.  Any other libraries (eg X) may also 
need to be recompiled.

On ELF systems you should be able to make libfloat a shared object which will 
ease the pain of having to link it with every binary.  It should then be 
realistically possible to build a system without using the ARM floating point 
emulator, which is good if you want to use 2.1 kernels or don't like to use 
proprietary code.  In theory the softfloat library should be a performance win 
over the emulator as well though I haven't even tried to measure this.  I'd be 
interested in the results if anybody tests this out.

Neil: most of the substantive changes I made are in fplib_glue.S.  I tried to 
avoid breaking NetBSD compatibility but I haven't checked that it still works.
It would be nice to be able to use the same code on both NetBSD and Linux and 
it shouldn't be too hard to arrange, since the floating-point code is pretty 
much OS independent.  You might like to take a look at that file and my 
arm-gcc.h.

p.

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: "Neil A. Carson" <[email-masked]>
Date: Thu, 23 Jul 1998 02:28:54 +0100

> much OS independent.  You might like to take a look at that file and my

Okay, I'll fish it out over the weekend.

	Cheers,

	Neil

-- 
Neil A. Carson

---

From: "Neil A. Carson" <[email-masked]>
Date: Thu, 23 Jul 1998 23:43:02 +0100

Greetings,

Does anyone know if a full soft-float userland is going to appear at
some stage? Also, when will there be a version of the FP Emulator that
works with Linux 2.1 kernels available? I'm presently trying to run 2.1,
and things seem to fall over left right and centre which is apparently
due to the lack of the FPE.

Alternatively, if someone can provide me with some knowledge as to what
the required FP interfaces are (I don't have time to read the source) I
can make a proper, more efficient version of the emulator available that
handles multiple register sets better (see the one in NetBSD, which
could potentially be ported over although it only works in a full 32-bit
mode).

	Regards,

	Neil

-- 
Neil A. Carson

---

From: Philip Blundell <[email-masked]>
Date: Fri, 24 Jul 1998 09:47:25 +0100

>some stage?

Yes, it's on my list of things to do.  I'm currently busy with other things 
but I hope to do it within a few weeks.

p.