1994-08-19 07:56:44 +04:00
|
|
|
/*
|
1995-04-29 02:43:31 +04:00
|
|
|
* Written by J.T. Conklin <jtc@netbsd.org>.
|
|
|
|
* Public domain.
|
1994-08-19 07:56:44 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <machine/asm.h>
|
|
|
|
|
2001-06-19 04:26:29 +04:00
|
|
|
RCSID("$NetBSD: s_ilogbf.S,v 1.5 2001/06/19 00:26:30 fvdl Exp $")
|
1994-08-19 07:56:44 +04:00
|
|
|
|
|
|
|
ENTRY(ilogbf)
|
2001-06-19 04:26:29 +04:00
|
|
|
#ifdef __i386__
|
1995-10-22 23:32:43 +03:00
|
|
|
pushl %ebp
|
1994-08-19 07:56:44 +04:00
|
|
|
movl %esp,%ebp
|
|
|
|
subl $4,%esp
|
|
|
|
|
|
|
|
flds 8(%ebp)
|
|
|
|
fxtract
|
2001-06-19 04:26:29 +04:00
|
|
|
fstp %st
|
1994-08-19 07:56:44 +04:00
|
|
|
|
|
|
|
fistpl -4(%ebp)
|
|
|
|
movl -4(%ebp),%eax
|
|
|
|
|
|
|
|
leave
|
2001-06-19 04:26:29 +04:00
|
|
|
#else
|
|
|
|
movss %xmm0,-4(%rsp)
|
|
|
|
flds -4(%rsp)
|
|
|
|
fxtract
|
|
|
|
fstp %st
|
|
|
|
fistpl -4(%rsp)
|
|
|
|
movl -4(%rsp),%eax
|
|
|
|
#endif
|
1994-08-19 07:56:44 +04:00
|
|
|
ret
|