aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/i386/fpu/e_log.S8
-rw-r--r--sysdeps/i386/fpu/e_logf.S8
-rw-r--r--sysdeps/i386/fpu/e_logl.S8
-rw-r--r--sysdeps/i386/i686/fpu/e_logl.S8
-rw-r--r--sysdeps/x86_64/fpu/e_log10l.S8
-rw-r--r--sysdeps/x86_64/fpu/e_log2l.S8
-rw-r--r--sysdeps/x86_64/fpu/e_logl.S8
7 files changed, 49 insertions, 7 deletions
diff --git a/sysdeps/i386/fpu/e_log.S b/sysdeps/i386/fpu/e_log.S
index 3fa32aa..335df22 100644
--- a/sysdeps/i386/fpu/e_log.S
+++ b/sysdeps/i386/fpu/e_log.S
@@ -80,7 +80,13 @@ ENTRY(__log_finite)
fnstsw // x-1 : x : log(2)
andb $0x45, %ah
jz 2b
- fstp %st(1) // x-1 : log(2)
+ fxam
+ fnstsw
+ andb $0x45, %ah
+ cmpb $0x40, %ah
+ jne 6f
+ fabs // log(1) is +0 in all rounding modes.
+6: fstp %st(1) // x-1 : log(2)
fyl2xp1 // log(x)
ret
END(__log_finite)
diff --git a/sysdeps/i386/fpu/e_logf.S b/sysdeps/i386/fpu/e_logf.S
index ca83d39..de967a3 100644
--- a/sysdeps/i386/fpu/e_logf.S
+++ b/sysdeps/i386/fpu/e_logf.S
@@ -81,7 +81,13 @@ ENTRY(__logf_finite)
fnstsw // x-1 : x : log(2)
andb $0x45, %ah
jz 2b
- fstp %st(1) // x-1 : log(2)
+ fxam
+ fnstsw
+ andb $0x45, %ah
+ cmpb $0x40, %ah
+ jne 6f
+ fabs // log(1) is +0 in all rounding modes.
+6: fstp %st(1) // x-1 : log(2)
fyl2xp1 // log(x)
ret
END(__logf_finite)
diff --git a/sysdeps/i386/fpu/e_logl.S b/sysdeps/i386/fpu/e_logl.S
index 828e98a..7a6d370 100644
--- a/sysdeps/i386/fpu/e_logl.S
+++ b/sysdeps/i386/fpu/e_logl.S
@@ -84,7 +84,13 @@ ENTRY(__logl_finite)
fnstsw // x-1 : x : log(2)
andb $0x45, %ah
jz 2b
- fstp %st(1) // x-1 : log(2)
+ fxam
+ fnstsw
+ andb $0x45, %ah
+ cmpb $0x40, %ah
+ jne 7f
+ fabs // log(1) is +0 in all rounding modes.
+7: fstp %st(1) // x-1 : log(2)
fyl2xp1 // log(x)
ret
END(__logl_finite)
diff --git a/sysdeps/i386/i686/fpu/e_logl.S b/sysdeps/i386/i686/fpu/e_logl.S
index 0ccc8fc..e9ecbcd 100644
--- a/sysdeps/i386/i686/fpu/e_logl.S
+++ b/sysdeps/i386/i686/fpu/e_logl.S
@@ -81,7 +81,13 @@ ENTRY(__logl_finite)
fcomip %st(1) // |x-1| : x-1 : x : log(2)
fstp %st(0) // x-1 : x : log(2)
jc 2b
- fstp %st(1) // x-1 : log(2)
+ fxam
+ fnstsw
+ andb $0x45, %ah
+ cmpb $0x40, %ah
+ jne 6f
+ fabs // log(1) is +0 in all rounding modes.
+6: fstp %st(1) // x-1 : log(2)
fyl2xp1 // log(x)
ret
END(__logl_finite)
diff --git a/sysdeps/x86_64/fpu/e_log10l.S b/sysdeps/x86_64/fpu/e_log10l.S
index 2607ad1..8fa6164 100644
--- a/sysdeps/x86_64/fpu/e_log10l.S
+++ b/sysdeps/x86_64/fpu/e_log10l.S
@@ -79,7 +79,13 @@ ENTRY(__log10l_finite)
fnstsw // x-1 : x : log10(2)
andb $0x45, %ah
jz 2b
- fstp %st(1) // x-1 : log10(2)
+ fxam
+ fnstsw
+ andb $0x45, %ah
+ cmpb $0x40, %ah
+ jne 6f
+ fabs // log10(1) is +0 in all rounding modes.
+6: fstp %st(1) // x-1 : log10(2)
fyl2xp1 // log10(x)
ret
END(__log10l_finite)
diff --git a/sysdeps/x86_64/fpu/e_log2l.S b/sysdeps/x86_64/fpu/e_log2l.S
index c12906d..a063255 100644
--- a/sysdeps/x86_64/fpu/e_log2l.S
+++ b/sysdeps/x86_64/fpu/e_log2l.S
@@ -78,7 +78,13 @@ ENTRY(__log2l_finite)
fnstsw // x-1 : x : 1
andb $0x45, %ah
jz 2b
- fstp %st(1) // x-1 : 1
+ fxam
+ fnstsw
+ andb $0x45, %ah
+ cmpb $0x40, %ah
+ jne 6f
+ fabs // log2(1) is +0 in all rounding modes.
+6: fstp %st(1) // x-1 : 1
fyl2xp1 // log(x)
ret
END (__log2l_finite)
diff --git a/sysdeps/x86_64/fpu/e_logl.S b/sysdeps/x86_64/fpu/e_logl.S
index 047b8db..dbe6fd5 100644
--- a/sysdeps/x86_64/fpu/e_logl.S
+++ b/sysdeps/x86_64/fpu/e_logl.S
@@ -81,7 +81,13 @@ ENTRY(__logl_finite)
fnstsw // x-1 : x : log(2)
andb $0x45, %ah
jz 2b
- fstp %st(1) // x-1 : log(2)
+ fxam
+ fnstsw
+ andb $0x45, %ah
+ cmpb $0x40, %ah
+ jne 7f
+ fabs // log(1) is +0 in all rounding modes.
+7: fstp %st(1) // x-1 : log(2)
fyl2xp1 // log(x)
ret
END (__logl_finite)