| To: | greg.roelofs@philips.com |
|---|---|
| Subject: | Re: apparent math-emu hang on movf instruction |
| From: | Richard Sandiford <rsandifo@redhat.com> |
| Date: | Thu, 29 Jul 2004 08:01:24 +0100 |
| Cc: | <linux-mips@linux-mips.org> |
| In-reply-to: | <876587uwud.fsf@redhat.com> (Richard Sandiford's message of "Thu, 29 Jul 2004 07:54:50 +0100") |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <OFFE4A0198.56A3A2A2-ON88256EDF.006D0D9F@philips.com> <876587uwud.fsf@redhat.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
| User-agent: | Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
Richard Sandiford <rsandifo@redhat.com> writes:
> Does the patch below (against 2.6) fix things? Only the first hunk
> is needed to fix the bug, the rest is just there for consistency.
Oops! Serves me right for dabbling in new code. Only the first
hunk is correct.
Richard
Index: arch/mips/math-emu/cp1emu.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/math-emu/cp1emu.c,v
retrieving revision 1.32
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.32 cp1emu.c
--- arch/mips/math-emu/cp1emu.c 19 Jan 2004 16:25:21 -0000 1.32
+++ arch/mips/math-emu/cp1emu.c 29 Jul 2004 06:42:53 -0000
@@ -528,9 +528,8 @@ static int cop1Emulate(struct pt_regs *x
if (MIPSInst_FUNC(ir) != movc_op)
return SIGILL;
cond = fpucondbit[MIPSInst_RT(ir) >> 2];
- if (((ctx->fcr31 & cond) != 0) != ((MIPSInst_RT(ir) & 1) != 0))
- return 0;
- xcp->regs[MIPSInst_RD(ir)] = xcp->regs[MIPSInst_RS(ir)];
+ if (((ctx->fcr31 & cond) != 0) == ((MIPSInst_RT(ir) & 1) != 0))
+ xcp->regs[MIPSInst_RD(ir)] = xcp->regs[MIPSInst_RS(ir)];
break;
#endif
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: apparent math-emu hang on movf instruction, Richard Sandiford |
|---|---|
| Next by Date: | [PATCH] vr41xx: remove obsolete flag, Yoichi Yuasa |
| Previous by Thread: | Re: apparent math-emu hang on movf instruction, Richard Sandiford |
| Next by Thread: | Re: apparent math-emu hang on movf instruction, Maciej W. Rozycki |
| Indexes: | [Date] [Thread] [Top] [All Lists] |