diff options
author | Ulrich Drepper <drepper@redhat.com> | 1997-03-20 03:20:56 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1997-03-20 03:20:56 +0000 |
commit | 630ee40e9240f415e01b7b338938fc9d84d81253 (patch) | |
tree | e1213b628e771bf6c764c9f4e724211a67ce0ab9 /sysdeps/libm-i387 | |
parent | 637a638f303ff6487c633014ee7df3bcea381daa (diff) | |
download | glibc-630ee40e9240f415e01b7b338938fc9d84d81253.tar glibc-630ee40e9240f415e01b7b338938fc9d84d81253.tar.gz glibc-630ee40e9240f415e01b7b338938fc9d84d81253.tar.bz2 glibc-630ee40e9240f415e01b7b338938fc9d84d81253.zip |
Correct recognition of mantissa overflow.
Diffstat (limited to 'sysdeps/libm-i387')
-rw-r--r-- | sysdeps/libm-i387/e_pow.S | 15 | ||||
-rw-r--r-- | sysdeps/libm-i387/e_powf.S | 15 |
2 files changed, 16 insertions, 14 deletions
diff --git a/sysdeps/libm-i387/e_pow.S b/sysdeps/libm-i387/e_pow.S index efe184168b..e665326438 100644 --- a/sysdeps/libm-i387/e_pow.S +++ b/sysdeps/libm-i387/e_pow.S @@ -64,6 +64,13 @@ nan: .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f ENTRY(__ieee754_pow) fldl 12(%esp) // y fxam + +#ifdef PIC + call 1f +1: popl %ecx + addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ecx +#endif + fnstsw movb %ah, %dl andb $0x45, %ah @@ -76,12 +83,6 @@ ENTRY(__ieee754_pow) cmpb $0x01, %ah // is y == NaN ? je 30f -#ifdef PIC - call 1f -1: popl %ecx - addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ecx -#endif - fldl 4(%esp) // x : y subl $8,%esp @@ -307,7 +308,7 @@ ENTRY(__ieee754_pow) andb $1, %al jz 24f // jump if not odd cmpl $0xffe00000, %edx - jbe 24f // does not fit in mantissa bits + jae 24f // does not fit in mantissa bits // It's an odd integer. fldl MO(mzero) ret diff --git a/sysdeps/libm-i387/e_powf.S b/sysdeps/libm-i387/e_powf.S index 54af93c961..102cd4e3af 100644 --- a/sysdeps/libm-i387/e_powf.S +++ b/sysdeps/libm-i387/e_powf.S @@ -64,6 +64,13 @@ nan: .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f ENTRY(__ieee754_powf) flds 8(%esp) // y fxam + +#ifdef PIC + call 1f +1: popl %ecx + addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ecx +#endif + fnstsw movb %ah, %dl andb $0x45, %ah @@ -76,12 +83,6 @@ ENTRY(__ieee754_powf) cmpb $0x01, %ah // is y == NaN ? je 30f -#ifdef PIC - call 1f -1: popl %ecx - addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ecx -#endif - flds 4(%esp) // x : y subl $4, %esp @@ -299,7 +300,7 @@ ENTRY(__ieee754_powf) testb $1, %dl jz 24f // jump if not odd cmpl $0xff000000, %edx - jbe 24f // does not fit in mantissa bits + jae 24f // does not fit in mantissa bits // It's an odd integer. fldl MO(mzero) ret |