Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: floating point emulation broken

1 view
Skip to first unread message

Toru Nishimura

unread,
Oct 20, 2010, 9:31:48 PM10/20/10
to
Manuel Bouyer said;

> the in-kernel floating point emulation seems seriously broken.
> ...
> anyone familiar with mips floating point ?

fp.S was inherited from pre-NetBSD project and the maintainance has
been in abandoned state for many years. The assembler implementation
is unlikely fixable, better to replace with fresh code with softfloat mathlib,
as well as xfer between 32x 64bit FP number and 64bit GP for MIPS64.
matt@ has some progress in insn emul, I suppose.

Toru Nishimura / ALKYL Technology

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-...@muc.de

Toru Nishimura

unread,
Oct 21, 2010, 7:13:30 AM10/21/10
to
Paul Koning said;

>> fp.S was inherited from pre-NetBSD project and the maintainance has
>> been in abandoned state for many years. The assembler implementation
> is unlikely fixable,
>

> I agree. fp.S emulates MIPS-2 float, which means that it doesn't do
> any good for anything compiled to a newer target.

In fact, fp.S itself is a sort of an archaic heritage. It emulates R2010, the
original MIPS FPU as a standalone math coprocessor. fp.S was written
for DECstaiton 3100.

> In our case here, we dropped it 3-4 years ago and switched to
> a NOFLOAT kernel with soft-float in userland. For an embedded
> system that's a much cleaner solution and it avoids having to fight
> with the compiler when you want a newer integer instruction set.

Quite reasonable since the main stream has been FPU-less MIPS32. Note
that full scale FPemul is *mandatory* even for FPU-equipped processors
since FP circuit potentially emits exceptions when it detects imprecise
math condition to ask SW intervention for recovery...

Paul Koning

unread,
Oct 21, 2010, 6:46:08 AM10/21/10
to

On Oct 20, 2010, at 9:31 PM, Toru Nishimura wrote:

> Manuel Bouyer said;
>
>> the in-kernel floating point emulation seems seriously broken.
>> ...
>> anyone familiar with mips floating point ?
>
> fp.S was inherited from pre-NetBSD project and the maintainance has
> been in abandoned state for many years. The assembler implementation
> is unlikely fixable, better to replace with fresh code with softfloat mathlib,
> as well as xfer between 32x 64bit FP number and 64bit GP for MIPS64.
> matt@ has some progress in insn emul, I suppose.

I agree. fp.S emulates MIPS-2 float, which means that it doesn't do any good for anything compiled to a newer target.

In our case here, we dropped it 3-4 years ago and switched to a NOFLOAT kernel with soft-float in userland. For an embedded system that's a much cleaner solution and it avoids having to fight with the compiler when you want a newer integer instruction set.

paul

0 new messages