1cc58d5d40ae6a1d61e6f138f63b5fc266ff6a14
[dragonfly.git] / lib / libm / arch / i386 / s_finitef.S
1 /*
2  * Written by J.T. Conklin <jtc@NetBSD.org>.
3  * Public domain.
4  *
5  * $NetBSD: s_finitef.S,v 1.6 2003/07/26 19:25:01 salo Exp $
6  * $DragonFly: src/lib/libm/arch/i386/s_finitef.S,v 1.1 2005/07/26 21:15:19 joerg Exp $
7  */
8
9 #include <machine/asm.h>
10
11 ENTRY(finitef)
12 #ifdef __i386__
13         movl    4(%esp),%eax
14         andl    $0x7f800000, %eax
15         cmpl    $0x7f800000, %eax
16         setne   %al
17         andl    $0x000000ff, %eax
18 #else
19         xorl    %eax,%eax
20         movl    $0x7ff00000,%esi
21         movss   %xmm0,-4(%rsp)
22         andl    -4(%rsp),%esi
23         cmpl    $0x7ff00000,%esi
24         setne   %al
25 #endif
26         ret