[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Lunatik -- NetBSD kernel scripting with Lua (GSoC project
- From: Sam Roberts <vieuxtech@...>
- Date: Fri, 8 Oct 2010 19:03:27 -0700
On Wed, Oct 6, 2010 at 2:12 PM, Javier Guerra Giraldez
> On Wed, Oct 6, 2010 at 3:48 PM, Lourival Vieira Neto
> <firstname.lastname@example.org> wrote:
>> the only limitation on the
>> language _core_ is the numeric format. It was redefined from a
>> floating point type to an integer type (long long).
> just curious, why was that needed? is floating point forbidden by
> code conventions?
I would guess it is because the FPU often has a lot of state that is
only saved and restored during context switches. If the kernel did
floating point ops, it would modify that state, damaging it. It would
be possible to have different FPU state just for the kernel, but
saving and restoreing FPU (used to be) a fairly expensive part of
context switching, at least on x86, so saving and restoring on every
system call/kernel entry would be prohibitive.