xref: /minix3/lib/libm/arch/i387/s_ilogbl.S (revision 84d9c625bfea59e274550651111ae9edfdc40fbd)
1/*
2 * Written by J.T. Conklin <jtc@NetBSD.org>.
3 * Public domain.
4 */
5
6#include <machine/asm.h>
7
8RCSID("$NetBSD: s_ilogbl.S,v 1.1 2011/07/28 22:32:28 joerg Exp $")
9
10#include "abi.h"
11
12ENTRY(ilogbl)
13	fldt	ARG_LONG_DOUBLE_ONE
14	fxtract
15	fstp	%st
16#ifdef __i386__
17	pushl	%eax
18	fistpl	0(%esp)
19	popl	%eax
20#else
21	fistpl	-4(%rsp)
22	movl	-4(%rsp), %eax
23#endif
24	ret
25