about summary refs log tree commit diff
path: root/sysdeps/libm-i387/s_ilogbl.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/libm-i387/s_ilogbl.S')
-rw-r--r--sysdeps/libm-i387/s_ilogbl.S24
1 files changed, 24 insertions, 0 deletions
diff --git a/sysdeps/libm-i387/s_ilogbl.S b/sysdeps/libm-i387/s_ilogbl.S
new file mode 100644
index 0000000000..11c81011c6
--- /dev/null
+++ b/sysdeps/libm-i387/s_ilogbl.S
@@ -0,0 +1,24 @@
+/*
+ * Written by J.T. Conklin <jtc@netbsd.org>.
+ * Changes for long double by Ulrich Drepper <drepper@cygnus.com>
+ * Public domain.
+ */
+
+#include <machine/asm.h>
+
+RCSID("$NetBSD: $")
+
+ENTRY(__ilogbl)
+	pushl	%ebp
+	movl	%esp,%ebp
+	subl	$4,%esp
+
+	fldt	8(%ebp)
+	fxtract
+
+	fistpl	-4(%ebp)
+	movl	-4(%ebp),%eax
+
+	leave
+	ret
+weak_alias (__ilogbl, ilogbl)