All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@oss.sgi.com>
To: Kjeld Borch Egevang <kjelde@mips.com>
Cc: Mark Salter <msalter@redhat.com>, linux-mips@oss.sgi.com
Subject: Re: math emulator patch
Date: Mon, 3 Dec 2001 00:12:33 +1100	[thread overview]
Message-ID: <20011203001233.A13616@dea.linux-mips.net> (raw)
In-Reply-To: <Pine.LNX.4.33.0112010033480.29161-100000@coplin19.mips.com>; from kjelde@mips.com on Sat, Dec 01, 2001 at 12:36:44AM +0100

On Sat, Dec 01, 2001 at 12:36:44AM +0100, Kjeld Borch Egevang wrote:

> Great. The same problem exists for sp_tlong.c and dp_tlong.c.

Ok, this is what I'm going to checkin for both 2.4 and 2.5.  Tell me if
that's ok.

Btw, we've got so many almost identical sourcefiles in the fp emulation
code, something should be done about that ...

  Ralf

Index: arch/mips/math-emu/dp_tint.c
===================================================================
RCS file: /home/pub/cvs/linux/arch/mips/math-emu/dp_tint.c,v
retrieving revision 1.4
diff -u -r1.4 dp_tint.c
--- arch/mips/math-emu/dp_tint.c	2001/10/09 23:56:18	1.4
+++ arch/mips/math-emu/dp_tint.c	2001/12/02 13:10:44
@@ -50,6 +50,9 @@
 		break;
 	}
 	if (xe >= 31) {
+		/* look for valid corner case */
+		if (xe == 31 && xs && xm == DP_HIDDEN_BIT)
+			return -2147483648;
 		/* Set invalid. We will only use overflow for floating
 		   point overflow */
 		SETCX(IEEE754_INVALID_OPERATION);
Index: arch/mips/math-emu/dp_tlong.c
===================================================================
RCS file: /home/pub/cvs/linux/arch/mips/math-emu/dp_tlong.c,v
retrieving revision 1.5
diff -u -r1.5 dp_tlong.c
--- arch/mips/math-emu/dp_tlong.c	2001/11/21 15:53:51	1.5
+++ arch/mips/math-emu/dp_tlong.c	2001/12/02 13:10:44
@@ -49,6 +49,9 @@
 		break;
 	}
 	if (xe >= 63) {
+		/* look for valid corner case */ 
+		if (xe == 63 && xs && xm == DP_HIDDEN_BIT)
+			return -9223372036854775808LL;
 		/* Set invalid. We will only use overflow for floating
 		   point overflow */
 		SETCX(IEEE754_INVALID_OPERATION);
Index: arch/mips/math-emu/sp_tint.c
===================================================================
RCS file: /home/pub/cvs/linux/arch/mips/math-emu/sp_tint.c,v
retrieving revision 1.4
diff -u -r1.4 sp_tint.c
--- arch/mips/math-emu/sp_tint.c	2001/10/09 23:56:19	1.4
+++ arch/mips/math-emu/sp_tint.c	2001/12/02 13:10:44
@@ -50,6 +50,9 @@
 		break;
 	}
 	if (xe >= 31) {
+		/* look for valid corner case */
+		if (xe == 31 && xs && xm == SP_HIDDEN_BIT)
+			return -2147483648;
 		/* Set invalid. We will only use overflow for floating
 		   point overflow */
 		SETCX(IEEE754_INVALID_OPERATION);
Index: arch/mips/math-emu/sp_tlong.c
===================================================================
RCS file: /home/pub/cvs/linux/arch/mips/math-emu/sp_tlong.c,v
retrieving revision 1.4
diff -u -r1.4 sp_tlong.c
--- arch/mips/math-emu/sp_tlong.c	2001/10/09 23:56:19	1.4
+++ arch/mips/math-emu/sp_tlong.c	2001/12/02 13:10:44
@@ -49,6 +49,9 @@
 		break;
 	}
 	if (xe >= 63) {
+		/* look for valid corner case */
+		if (xe == 63 && xs && xm == SP_HIDDEN_BIT)
+			return -9223372036854775808LL;
 		/* Set invalid. We will only use overflow for floating
 		   point overflow */
 		SETCX(IEEE754_INVALID_OPERATION);

  reply	other threads:[~2001-12-02 14:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-30  1:38 math emulator patch Mark Salter
2001-11-30 23:36 ` Kjeld Borch Egevang
2001-11-30 23:36   ` Kjeld Borch Egevang
2001-12-02 13:12   ` Ralf Baechle [this message]
2001-12-02 13:22     ` Geert Uytterhoeven
2001-12-02 13:40       ` Ralf Baechle
2002-05-17 14:04   ` Kjeld Borch Egevang

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=20011203001233.A13616@dea.linux-mips.net \
    --to=ralf@oss.sgi.com \
    --cc=kjelde@mips.com \
    --cc=linux-mips@oss.sgi.com \
    --cc=msalter@redhat.com \
    /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.