Import OpenBSD's libm (trunk, 4 July 2015) to a new vendor branch
[dragonfly.git] / contrib / openbsd_libm / arch / amd64 / s_ilogbf.S
1 /*      $OpenBSD: s_ilogbf.S,v 1.3 2009/04/08 22:30:41 martynas Exp $ */
2 /*
3  * Written by J.T. Conklin <jtc@NetBSD.org>.
4  * Public domain.
5  */
6
7 #include <machine/asm.h>
8
9 ENTRY(ilogbf)
10         movss   %xmm0,-4(%rsp)
11         flds    -4(%rsp)
12         fxtract
13         fstp    %st
14         fistpl  -4(%rsp)
15         movl    -4(%rsp),%eax
16         ret