Re: math emulator patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);

[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux