Subject: Floating Point Emulation

From: "Dan" <[email-masked]>
Date: Wed, 7 Jun 2000 10:24:18 -0600

Hello:

We have recently ported Linux to an SA1110-based
board for a portable application.

With little experience with the ARM processor and
none with Linux, we were prepared for quite the
battle. However, much to our surprise it was amazingly
easy. I just about fell off my chair when we saw
the console login come up and we typed root. Cool!

Now to the task at hand.

The Linux Kernel uses Floating Point Emulation coupled
via the ARM's undefined instruction vector. The development
environment -- gcc and the libs -- relies on the use
of floating point instructions being emitted by the
compiler.

My problem is that I have a small C++ stand-alone
application that I want to use to test new boards.
I would like to build the application using the
arm-linux development environment. I do not want to
spawn a second set of libraries compatible with the
-msoft-float flag.

Can the Floating Point Emulation used by the Linux
Kernel be used without the kernel ?

The code at the undefined instruction vector passes
a data area from the current task into the FPEmulator.

Is this just a scratch area or is it used to pass
data to the Emulator ?

Any advice would be appreciated.

--------------------------------
Bye!
Dan McDonald
The Late Night Software Shop 
Sign up today for your Free E-mail at: http://www.canoe.ca/CanoeMail 

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

---

From: Nicolas Pitre <[email-masked]>
Date: Wed, 7 Jun 2000 12:38:38 -0400 (EDT)

> the console login come up and we typed root. Cool!

;-)

> spawn a second set of libraries compatible with the

If you can arrange for not using floating point operations in your code
i.e. using fixed point math techniques instead, then you may just ignore
the whole issue.  Do you really need floating point for your testing app
anyway?

Nicolas

---

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

What timing.. :)

I'm fighting the same thing.  I am attempting to turn OFF the floating
point emulation in the kernel and remove the need for the second
library.  All of the other platforms that I am used to use the built in
gcc library for floating point emulation.

I am currently working on patching gcc (2.95.2) to do soft-float the way
other platforms do it.  (If you look in the gcc source in gcc/config/arm
you'll see a but of "t-*" files.  all of the files EXCEPT the linux one
use the built-in soft-floating point.  So it should be possible.)  FYI,
I have yet to run the tests on the floating point, so what I have now
may not work the way I think it does!

If you would like a copy of my patches email me off the list and I'll go
into exactly what I'm doing.

--Mark