Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 May 1996 01:33:21 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        ajones@ctron.com, hackers@freefall.freebsd.org
Subject:   Re: using floating point arithmetic inside a device driver
Message-ID:  <199605281533.BAA24835@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>  I'm writing a device driver which needs to do some floating point
>calculations, but when the floating point code executes the kernel traps
>with number 22 "FPU device not available".  I'm have an AMD 486DX4-120.
>I'm not concerned with portability at this time (ie running on SX's).

Floating point isn't supported in the kernel.  Supporting it by switching
the floating point state on every syscall, trap and interrupt would waste
a lot of time (several hundred cycles per switch).  "Lazy" switching (i.e.,
switching only when necessary) would waste less time (about 40 cycles per
switch on a P133) (except when it is actually used it would waste more time)
but would be more complicated.  FreeBSD uses lazy switching but only for
processes.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605281533.BAA24835>