Subject: Re: mk.conf and "I387_LIBM"
To: Ben Collver <collver@softhome.net>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: port-i386
Date: 10/23/2000 10:49:07
On Sun, Oct 22, 2000 at 01:07:28PM -0700, Ben Collver wrote:
> This conversation struck up my curiosity.  I think in Linux, the i387 FPU
> emulation is automatically handled in the kernel by trapping illegal
> instructions.  If I understand this conversation correctly, it means that
> NetBSD applications linked against libm will perform better on Intel
> machines without FPU's because the floating point emulation is built into
> the library.

Yes, it's quite possible. But there are issues with FP instructions in the
programs themselves too.

> 
> But I remember seeing floating point emulation as an option in the kernel.
> Is NetBSD's floating point emulation happening "per instruction" by
> trapping illegal instructions?

There are 2 things:  whenever libm uses FPU or not, and
emulating instruction in when we don't have a FPU. The later is for
instructions encountered in the programs themselves (e.g. a division of
doubles), but the kernel emulator isn't good enouth to run FPU intructions
of libm.

--
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
--