OpenLIBM: local modification - elf notes on assembly
[dragonfly.git] / contrib / openbsd_libm / arch / amd64 / s_ilogb.S
1 /*      $OpenBSD: s_ilogb.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(ilogb)
10         movsd   %xmm0,-8(%rsp)
11         fldl    -8(%rsp)
12         fxtract
13         fstp    %st
14         fistpl  -8(%rsp)
15         movl    -8(%rsp),%eax
16         ret
17 END(ilogb)
18
19         .section .note.GNU-stack,"",%progbits