Subject: FPU support
To: Kjetil B. Thomassen <kjetil@thomassen.priv.no>
From: Ben Harris <bjh21@netbsd.org>
List: port-arm26
Date: 07/01/2001 13:51:51
On Sat, 30 Jun 2001, Kjetil B. Thomassen wrote:
> What about the FPA10?
The issues around here are a bit complex. I'll restrict myself to
considering kernel support for now. Note that most of this applies to the
FPPC as well as to the FPA.
The kernel needs FPA support to do two things: to handle operations that
the FPA can't do itself (e.g. on denormal numbers), and to save and
restore the FPA state on context switch. In NetBSD/arm32, these are both
done by the binary-only code in armfpe.s, which is the standard ARM Ltd
FPE. Unfortunately, this code is (I believe) dependent on running in
a 32-bit mode, so we'd need a 26-bit version if we wanted to run it on
NetBSD/arm26. Whether we can get this depends on ARM Ltd. This code is
also something of a pain to hook into our existing undefined-instruction
handler.
The alternative would be to do what the Linux mob did and implement our
own support code. For the FPA at least, I think the available
documentation is good enough. We can use SoftFloat to do the arithmetic,
so we'd just have to write the glue code. I've no idea how painful this
would be, but it should be maintainable in the long term.
Of course, the best thing would probably be for ARM Ltd to release the
source to their FPE under a BSD-like licence, but I suspect that's a bit
unlikely.
--
Ben Harris <bjh21@netbsd.org>
Portmaster, NetBSD/arm26 <URL:http://www.netbsd.org/Ports/arm26/>