From 6571c5709af6e58e3b9a571fc6289be375a1ffe3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 18 Feb 2001 09:02:38 +0000 Subject: Update. 2001-02-18 Ulrich Drepper * math/libm-test.inc (pow_test): Correct expected results for x == +-1. * sysdeps/i386/fpu/e_pow.S: Handle x == +-1 correctly. * sysdeps/i386/fpu/e_powf.S: Likewise. * sysdeps/i386/fpu/e_powl.S: Likewise. * sysdeps/i386/fpu/bits/mathinline.h: Remove pow inline code. * sysdeps/generic/e_exp2l.c: ...this. New file. * sysdeps/i386/fpu/e_exp2.S: ...this. New file. * sysdeps/i386/fpu/e_exp2f.S: ...this. New file. * sysdeps/i386/fpu/e_exp2l.S: ...this. New file. * sysdeps/ieee754/flt-32/e_exp2f.c: ...this. New file. * sysdeps/ieee754/dbl-64/e_exp2.c: ...this. New file. * sysdeps/m68k/fpu/e_exp2.c: ...this. New file. * sysdeps/m68k/fpu/e_exp2f.c: ...this. New file. * sysdeps/m68k/fpu/e_exp2l.c: ...this. New file. --- sysdeps/i386/fpu/e_powl.S | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'sysdeps/i386/fpu/e_powl.S') diff --git a/sysdeps/i386/fpu/e_powl.S b/sysdeps/i386/fpu/e_powl.S index 769be4c..c6aa731 100644 --- a/sysdeps/i386/fpu/e_powl.S +++ b/sysdeps/i386/fpu/e_powl.S @@ -1,5 +1,5 @@ /* ix87 specific implementation of pow function. - Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 1999, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -130,7 +130,18 @@ ENTRY(__ieee754_powl) orl %edx, %ecx jnz 6b fstp %st(0) // ST*x -30: ret + ret + + /* y is ±NAN */ +30: fldt 4(%esp) // x : y + fldl MO(one) // 1.0 : x : y + fucomp %st(1) // x : y + fnstsw + sahf + je 31f + fxch // y : x +31: fstp %st(1) + ret .align ALIGNARG(4) 2: /* y is a real number. */ @@ -189,8 +200,7 @@ ENTRY(__ieee754_powl) ret .align ALIGNARG(4) -14: fldl MO(infinity) - fmull MO(zero) // raise invalid exception +14: fldl MO(one) ret .align ALIGNARG(4) -- cgit v1.1