All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Sandiford <rsandifo@redhat.com>
To: greg.roelofs@philips.com
Cc: <linux-mips@linux-mips.org>
Subject: Re: apparent math-emu hang on movf instruction
Date: Thu, 29 Jul 2004 08:01:24 +0100	[thread overview]
Message-ID: <871xivuwjf.fsf@redhat.com> (raw)
In-Reply-To: <876587uwud.fsf@redhat.com> (Richard Sandiford's message of "Thu, 29 Jul 2004 07:54:50 +0100")

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
 

WARNING: multiple messages have this Message-ID (diff)
From: Richard Sandiford <rsandifo@redhat.com>
To: greg.roelofs@philips.com
Cc: linux-mips@linux-mips.org
Subject: Re: apparent math-emu hang on movf instruction
Date: Thu, 29 Jul 2004 08:01:24 +0100	[thread overview]
Message-ID: <871xivuwjf.fsf@redhat.com> (raw)
Message-ID: <20040729070124.sQjL9LwKmH0XBfjGmCSBA0zqZqu9eHJkoC23DZUFxQE@z> (raw)
In-Reply-To: <876587uwud.fsf@redhat.com> (Richard Sandiford's message of "Thu, 29 Jul 2004 07:54:50 +0100")

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
 

  reply	other threads:[~2004-07-29  7:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-28 19:54 apparent math-emu hang on movf instruction greg.roelofs
2004-07-28 19:54 ` greg.roelofs
2004-07-29  6:54 ` Richard Sandiford
2004-07-29  6:54   ` Richard Sandiford
2004-07-29  7:01   ` Richard Sandiford [this message]
2004-07-29  7:01     ` Richard Sandiford
2004-07-30  9:48     ` Maciej W. Rozycki
  -- strict thread matches above, loose matches on Subject: below --
2004-07-29 21:53 greg.roelofs
2004-07-29 21:53 ` greg.roelofs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871xivuwjf.fsf@redhat.com \
    --to=rsandifo@redhat.com \
    --cc=greg.roelofs@philips.com \
    --cc=linux-mips@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.