Re: Floating point in kernel

From: Jamie Lokier (
Date: Thu May 04 2000 - 06:31:08 EST

> >> My question is, what are the likely problems to expect from this when
> >> running in kernel-space (on x86 w/FPU)?
> > RARE random errors in programs with FPU usage. Since kernel doing
> > lazy store/restore FPU state and will just store garbage from your
> > instruction instead of correct data. Of course in most cases it'll
> > not change anything (only few flags and bottom of FPU stack should
> > be changed and it's not > very oftent important info). Code itself
> > should work fine :-)

You know, this is easily detected at compile time.
Use -msoft-float (on x86 & MIPS at least).

You can still use constant-folded floating point. But any attempt to do
run time FPU operations will now show up as a link failure. As it should.

-- Jamie

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sun May 07 2000 - 21:00:14 EST