linux-mips
[Top] [All Lists]

Re: [patch flood] Debugging patches

To: Daniel Jacobowitz <dan@debian.org>
Subject: Re: [patch flood] Debugging patches
From: Ralf Baechle <ralf@oss.sgi.com>
Date: Tue, 19 Jun 2001 02:33:50 +0200
Cc: linux-mips@oss.sgi.com
In-reply-to: <20010616124102.A31141@nevyn.them.org>; from dan@debian.org on Sat, Jun 16, 2001 at 12:41:02PM -0700
References: <20010616124102.A31141@nevyn.them.org>
Sender: owner-linux-mips@oss.sgi.com
User-agent: Mutt/1.2.5i
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

<Prev in Thread] Current Thread [Next in Thread>