On Tue, Jul 04, 2000 at 01:39:04PM +0200, Andreas Jaeger wrote:
> Ralf> I tried your program on a Indy running 2.4.0-test2 + glibc 2.2 and it
> Ralf> printing ``0 0''.
> Did you try it with a shared program?
> Static programs always initialize the FPU. Could you run the program on
> other machines also?
> Ralf> Could you check the source of your kernel for the value it's writing to
> Ralf> fcr31? That's the constant FPU_DEFAULT defined in arch/mips/kernel/
> Ralf> r4k_switch.S. Some quite old kernel were using a different value but I
> Ralf> was actually assuming those versions have already died out.
> The kernels I used have 0 as FPU_DEFAULT - but nevertheless the
> returned value is wrong. When is FPU_DEFAULT written to the FPU?
We do lazy fp context switching. So the kernel initializes the FPU for a
process at the moment when it attempts to use it for the first time. It
does so by enabling the FPU in the status register, clearing all flags in
$fcr31 and setting all fp registers to a SNAN.