patch-2.4.20 linux-2.4.20/arch/mips/math-emu/dp_tint.c
Next file: linux-2.4.20/arch/mips/math-emu/dp_tlong.c
Previous file: linux-2.4.20/arch/mips/math-emu/dp_sub.c
Back to the patch index
Back to the overall index
- Lines: 31
- Date:
Thu Nov 28 15:53:10 2002
- Orig file:
linux-2.4.19/arch/mips/math-emu/dp_tint.c
- Orig date:
Fri Aug 2 17:39:43 2002
diff -urN linux-2.4.19/arch/mips/math-emu/dp_tint.c linux-2.4.20/arch/mips/math-emu/dp_tint.c
@@ -49,10 +49,7 @@
case IEEE754_CLASS_NORM:
break;
}
- if (xe >= 31) {
- /* look for valid corner case */
- if (xe == 31 && xs && xm == DP_HIDDEN_BIT)
- return -2147483648;
+ if (xe > 31) {
/* Set invalid. We will only use overflow for floating
point overflow */
SETCX(IEEE754_INVALID_OPERATION);
@@ -62,7 +59,7 @@
if (xe > DP_MBITS) {
xm <<= xe - DP_MBITS;
} else if (xe < DP_MBITS) {
- unsigned long long residue;
+ u64 residue;
int round;
int sticky;
int odd;
@@ -98,7 +95,8 @@
xm++;
break;
}
- if ((xm >> 31) != 0) {
+ /* look for valid corner case 0x80000000 */
+ if ((xm >> 31) != 0 && (xs == 0 || xm != 0x80000000)) {
/* This can happen after rounding */
SETCX(IEEE754_INVALID_OPERATION);
return ieee754si_xcpt(ieee754si_indef(), "dp_tint", x);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)