From 6d0c49145e818f4f8417b61ddbe22c957825d5e9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 5 Dec 2000 06:36:53 +0000 Subject: Update. * sysdeps/i386/fpu/e_scalb.S: Handle NaN as first parameter correctly. * sysdeps/i386/fpu/e_scalbf.S: Likewise. * sysdeps/i386/fpu/e_scalbl.S: Likewise. * math/w_scalb.c: Don't use matherr except in SVID mode. * math/w_scalbf.c: Likewise. * math/w_scalbl.c: Likewise. * math/test-misc.c: Add test for NaN and scalbl. Reported by Fred J. Tydeman . 2000-12-04 Ulrich Drepper --- sysdeps/i386/fpu/e_scalb.S | 6 +++++- sysdeps/i386/fpu/e_scalbf.S | 6 +++++- sysdeps/i386/fpu/e_scalbl.S | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) (limited to 'sysdeps') diff --git a/sysdeps/i386/fpu/e_scalb.S b/sysdeps/i386/fpu/e_scalb.S index 7ff5541e2f..f463002617 100644 --- a/sysdeps/i386/fpu/e_scalb.S +++ b/sysdeps/i386/fpu/e_scalb.S @@ -50,7 +50,7 @@ ENTRY(__ieee754_scalb) fnstsw andl $0x4500, %eax cmpl $0x0100, %eax - je 2f + je 3f fld %st(1) frndint fcomp %st(2) @@ -91,4 +91,8 @@ ENTRY(__ieee754_scalb) #endif fldl MO(nan) ret + + /* The first parameter is a NaN. Return it. */ +3: fstp %st(1) + ret END(__ieee754_scalb) diff --git a/sysdeps/i386/fpu/e_scalbf.S b/sysdeps/i386/fpu/e_scalbf.S index 4222eecc97..4b5b0d07b3 100644 --- a/sysdeps/i386/fpu/e_scalbf.S +++ b/sysdeps/i386/fpu/e_scalbf.S @@ -52,7 +52,7 @@ ENTRY(__ieee754_scalbf) fnstsw andl $0x4500, %eax cmpl $0x0100, %eax - je 2f + je 3f fld %st(1) frndint fcomp %st(2) @@ -93,4 +93,8 @@ ENTRY(__ieee754_scalbf) #endif fldl MO(nan) ret + + /* The first parameter is a NaN. Return it. */ +3: fstp %st(1) + ret END(__ieee754_scalbf) diff --git a/sysdeps/i386/fpu/e_scalbl.S b/sysdeps/i386/fpu/e_scalbl.S index 56cc833a56..e8166fa9d5 100644 --- a/sysdeps/i386/fpu/e_scalbl.S +++ b/sysdeps/i386/fpu/e_scalbl.S @@ -52,7 +52,7 @@ ENTRY(__ieee754_scalbl) fnstsw andl $0x4500, %eax cmpl $0x0100, %eax - je 2f + je 3f fld %st(1) frndint fcomp %st(2) @@ -93,4 +93,8 @@ ENTRY(__ieee754_scalbl) #endif fldl MO(nan) ret + + /* The first parameter is a NaN. Return it. */ +3: fstp %st(1) + ret END(__ieee754_scalbl) -- cgit 1.4.1