diff options
author | Ulrich Drepper <drepper@redhat.com> | 2007-03-05 19:38:56 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2007-03-05 19:38:56 +0000 |
commit | 8f3edfee157e9369e2207d27901ea84bdec9e587 (patch) | |
tree | 5a2f7e779a58a21fa58e12813182d67d387bc408 /sysdeps/x86_64 | |
parent | 245a1481d7ec594670c521f8db7d22cfa93dd494 (diff) | |
download | glibc-8f3edfee157e9369e2207d27901ea84bdec9e587.tar glibc-8f3edfee157e9369e2207d27901ea84bdec9e587.tar.gz glibc-8f3edfee157e9369e2207d27901ea84bdec9e587.tar.bz2 glibc-8f3edfee157e9369e2207d27901ea84bdec9e587.zip |
[BZ #4096]
2007-03-01 Jakub Jelinek <jakub@redhat.com>
[BZ #4096]
* sysdeps/ieee754/dbl-64/e_pow.c (__ieee754_pow): Check for NaN
earlier.
* math/libm-test.inc (pow_test): Add more tests involving NaNs.
* sysdeps/i386/fpu/e_powf.S (__ieee754_powf): Avoid invalid exception
for x qNaN and y either +-inf or non-integer value.
* sysdeps/i386/fpu/e_pow.S (__ieee754_pow): Likewise.
* sysdeps/i386/fpu/e_powl.S (__ieee754_powl): Likewise.
* sysdeps/x86_64/fpu/e_powl.S (__ieee754_powl): Likewise.
Diffstat (limited to 'sysdeps/x86_64')
-rw-r--r-- | sysdeps/x86_64/fpu/e_powl.S | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/sysdeps/x86_64/fpu/e_powl.S b/sysdeps/x86_64/fpu/e_powl.S index 85f4deb3c7..4959bea7ac 100644 --- a/sysdeps/x86_64/fpu/e_powl.S +++ b/sysdeps/x86_64/fpu/e_powl.S @@ -1,5 +1,6 @@ /* ix87 specific implementation of pow function. - Copyright (C) 1996, 1997, 1998, 1999, 2001, 2004 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 1999, 2001, 2004, 2007 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -146,10 +147,11 @@ ENTRY(__ieee754_powl) 2: /* y is a real number. */ fxch // x : y fldl MO(one) // 1.0 : x : y - fld %st(1) // x : 1.0 : x : y - fsub %st(1) // x-1 : 1.0 : x : y - fabs // |x-1| : 1.0 : x : y - fcompl MO(limit) // 1.0 : x : y + fldl MO(limit) // 0.29 : 1.0 : x : y + fld %st(2) // x : 0.29 : 1.0 : x : y + fsub %st(2) // x-1 : 0.29 : 1.0 : x : y + fabs // |x-1| : 0.29 : 1.0 : x : y + fucompp // 1.0 : x : y fnstsw fxch // x : 1.0 : y test $4500,%eax @@ -190,9 +192,10 @@ ENTRY(__ieee754_powl) // y == ħinf .align ALIGNARG(4) 12: fstp %st(0) // pop y - fldt 8(%rsp) // x - fabs - fcompl MO(one) // < 1, == 1, or > 1 + fldl MO(one) // 1 + fldt 8(%rsp) // x : 1 + fabs // abs(x) : 1 + fucompp // < 1, == 1, or > 1 fnstsw andb $0x45, %ah cmpb $0x45, %ah |