lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, Oct 6, 2010 at 2:12 PM, Javier Guerra Giraldez
<javier@guerrag.com> wrote:
> On Wed, Oct 6, 2010 at 3:48 PM, Lourival Vieira Neto
> <lourival.neto@gmail.com> 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.

Cheers,
Sam