aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/i386/fpu/e_log10l.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386/fpu/e_log10l.S')
-rw-r--r--sysdeps/i386/fpu/e_log10l.S11
1 files changed, 10 insertions, 1 deletions
diff --git a/sysdeps/i386/fpu/e_log10l.S b/sysdeps/i386/fpu/e_log10l.S
index 6fe7c5a6f7..25d3501663 100644
--- a/sysdeps/i386/fpu/e_log10l.S
+++ b/sysdeps/i386/fpu/e_log10l.S
@@ -43,8 +43,12 @@ ENTRY(__ieee754_log10l)
1: popl %edx
addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %edx
#endif
+ fxam
+ fnstsw
fld %st // x : x : log10(2)
- fsubl MO(one) // x-1 : x : log10(2)
+ sahf
+ jc 3f // in case x is NaN or ħInf
+4: fsubl MO(one) // x-1 : x : log10(2)
fld %st // x-1 : x-1 : x : log10(2)
fabs // |x-1| : x-1 : x : log10(2)
fcompl MO(limit) // x-1 : x : log10(2)
@@ -58,4 +62,9 @@ ENTRY(__ieee754_log10l)
2: fstp %st(0) // x : log10(2)
fyl2x // log10(x)
ret
+
+3: jp 4b // in case x is ħInf
+ fstp %st(1)
+ fstp %st(1)
+ ret
END(__ieee754_log10l)