summaryrefslogtreecommitdiff
path: root/sysdeps/libm-i387
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-05-21 00:03:54 +0000
committerUlrich Drepper <drepper@redhat.com>1997-05-21 00:03:54 +0000
commit26753f62d645c8c858b54678a1dab684529e7807 (patch)
tree8c2b8ebaf82de2573940e9a88ca382b952d7c2ae /sysdeps/libm-i387
parent48956dfd0f8b453ced83c19b3f2fd481f0043e66 (diff)
downloadglibc-26753f62d645c8c858b54678a1dab684529e7807.tar
glibc-26753f62d645c8c858b54678a1dab684529e7807.tar.gz
glibc-26753f62d645c8c858b54678a1dab684529e7807.tar.bz2
glibc-26753f62d645c8c858b54678a1dab684529e7807.zip
Generate invalid exception correctly.
Diffstat (limited to 'sysdeps/libm-i387')
-rw-r--r--sysdeps/libm-i387/e_pow.S7
-rw-r--r--sysdeps/libm-i387/e_powf.S7
-rw-r--r--sysdeps/libm-i387/e_powl.S20
3 files changed, 13 insertions, 21 deletions
diff --git a/sysdeps/libm-i387/e_pow.S b/sysdeps/libm-i387/e_pow.S
index e665326438..45c41b48ab 100644
--- a/sysdeps/libm-i387/e_pow.S
+++ b/sysdeps/libm-i387/e_pow.S
@@ -48,9 +48,6 @@ one: .double 1.0
ASM_TYPE_DIRECTIVE(limit,@object)
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
- ASM_TYPE_DIRECTIVE(nan,@object)
-nan: .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
- ASM_SIZE_DIRECTIVE(nan)
#ifdef PIC
#define MO(op) op##@GOTOFF(%ecx)
@@ -191,8 +188,8 @@ ENTRY(__ieee754_pow)
ret
.align ALIGNARG(4)
-14: fldl MO(nan)
- faddl MO(zero) // raise invalid exception
+14: fldl MO(infinity)
+ fmull MO(zero) // raise invalid exception
ret
.align ALIGNARG(4)
diff --git a/sysdeps/libm-i387/e_powf.S b/sysdeps/libm-i387/e_powf.S
index 102cd4e3af..d7342bf56f 100644
--- a/sysdeps/libm-i387/e_powf.S
+++ b/sysdeps/libm-i387/e_powf.S
@@ -48,9 +48,6 @@ one: .double 1.0
ASM_TYPE_DIRECTIVE(limit,@object)
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
- ASM_TYPE_DIRECTIVE(nan,@object)
-nan: .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
- ASM_SIZE_DIRECTIVE(nan)
#ifdef PIC
#define MO(op) op##@GOTOFF(%ecx)
@@ -187,8 +184,8 @@ ENTRY(__ieee754_powf)
ret
.align ALIGNARG(4)
-14: fldl MO(nan)
- faddl MO(zero) // raise invalid exception
+14: fldl MO(infinity)
+ fmull MO(zero) // raise invalid exception
ret
.align ALIGNARG(4)
diff --git a/sysdeps/libm-i387/e_powl.S b/sysdeps/libm-i387/e_powl.S
index 3cfb96b213..0ea4829822 100644
--- a/sysdeps/libm-i387/e_powl.S
+++ b/sysdeps/libm-i387/e_powl.S
@@ -48,9 +48,6 @@ one: .double 1.0
ASM_TYPE_DIRECTIVE(limit,@object)
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
- ASM_TYPE_DIRECTIVE(nan,@object)
-nan: .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
- ASM_SIZE_DIRECTIVE(nan)
#ifdef PIC
#define MO(op) op##@GOTOFF(%ecx)
@@ -64,6 +61,13 @@ nan: .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
ENTRY(__ieee754_powl)
fldt 16(%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 +80,6 @@ ENTRY(__ieee754_powl)
cmpb $0x01, %ah // is y == NaN ?
je 30f
-#ifdef PIC
- call 1f
-1: popl %ecx
- addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ecx
-#endif
-
fldt 4(%esp) // x : y
subl $8,%esp
@@ -190,8 +188,8 @@ ENTRY(__ieee754_powl)
ret
.align ALIGNARG(4)
-14: fldl MO(nan)
- faddl MO(zero) // raise invalid exception
+14: fldl MO(infinity)
+ fmull MO(zero) // raise invalid exception
ret
.align ALIGNARG(4)