On Sat, Jun 16, 2001 at 12:41:02PM -0700, Daniel Jacobowitz wrote: > The biggest one was the fact that passing arguments to the inferior in > floating point registers just didn't work. I tracked this down to at least > three separate problems: > - We would set last_task_used_math without clearing the ST0_CU1 bit in > the previous task owning the FPU. When that previous task swapped > in again, it would use the existing FP registers, and lazy_fpu_switch > would never be called. This happened in signal.c and in ptrace.c. First signal.c segment - calling restore_fp_context should result in a proper FPU context switch. > - ptrace didn't look for the FP registers in the right places. This's > been broken since the FPU emulator merge a while back. > - We would create new processes with the ST0_CU1 bit already set if > their parent process had it set. No, copy_thread clears CU1. (Have to breed about this patch a bit more, stuff for the plane ...) > Of course, the lazy switching isn't quite as useful as it could be, since > every program will eventually use the FPU if not build -msoft-float - I > think it's happening in glibc. But we can possibly work around that later. > It still does save a great number of switches, so it's worthwhile - when it > works. Newer libcs shouldn't try to initialize $fcr31 to zero because that's already the default. > Other patches in my directory that I'm submitting along with that one: > - kgdb-crash-resistant.diff > - mips-gdb-with-kgdb.diff > - mips-rtsignal.diff These three look good, applied. Ralf