summaryrefslogtreecommitdiff
path: root/sysdeps/libm-i387/s_log1pl.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/libm-i387/s_log1pl.S')
-rw-r--r--sysdeps/libm-i387/s_log1pl.S25
1 files changed, 25 insertions, 0 deletions
diff --git a/sysdeps/libm-i387/s_log1pl.S b/sysdeps/libm-i387/s_log1pl.S
new file mode 100644
index 0000000000..4a9faf7ba4
--- /dev/null
+++ b/sysdeps/libm-i387/s_log1pl.S
@@ -0,0 +1,25 @@
+/*
+ * Written by J.T. Conklin <jtc@netbsd.org>.
+ * Public domain.
+ *
+ * Adapted for `long double' by Ulrich Drepper <drepper@cygnus.com>.
+ */
+
+#include <machine/asm.h>
+
+RCSID("$NetBSD: $")
+
+/*
+ * Since the fyl2xp1 instruction has such a limited range:
+ * -(1 - (sqrt(2) / 2)) <= x <= sqrt(2) - 1
+ * it's not worth trying to use it.
+ */
+
+ENTRY(__log1pl)
+ fldln2
+ fldt 4(%esp)
+ fld1
+ faddp
+ fyl2x
+ ret
+weak_alias (__log1pl, log1pl)