From: James S. <jsi...@us...> - 2002-02-14 20:47:19
|
Update of /cvsroot/linux-mips/linux/arch/mips/math-emu In directory usw-pr-cvs1:/tmp/cvs-serv18180 Modified Files: sp_fdp.c Log Message: FPU emulation fixes: o Converting a denormalized number now raises Inexact exception. o If rounding mode is "up", a positive denormalized double precision number should be converted to minimal (denormalized) single precision number. Index: sp_fdp.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/math-emu/sp_fdp.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- sp_fdp.c 11 Oct 2001 21:57:54 -0000 1.2 +++ sp_fdp.c 14 Feb 2002 20:47:12 -0000 1.3 @@ -55,6 +55,10 @@ case IEEE754_CLASS_DNORM: /* cant possibly be sp representable */ SETCX(IEEE754_UNDERFLOW); + SETCX(IEEE754_INEXACT); + if ((ieee754_csr.rm == IEEE754_RU && !xs) || + (ieee754_csr.rm == IEEE754_RD && xs)) + return ieee754sp_xcpt(ieee754sp_mind(xs), "fdp", x); return ieee754sp_xcpt(ieee754sp_zero(xs), "fdp", x); case IEEE754_CLASS_NORM: break; |