| Commit | Line | Data |
|---|---|---|
| 74dfd0cf JM |
1 | /* |
| 2 | * Written by J.T. Conklin <jtc@NetBSD.org>. | |
| 3 | * Public domain. | |
| 4 | * | |
| 5 | * $NetBSD: s_ilogbl.S,v 1.1 2011/07/28 22:32:28 joerg Exp $ | |
| 6 | */ | |
| 7 | ||
| 8 | #include <machine/asm.h> | |
| 9 | ||
| 10 | #include "abi.h" | |
| 11 | ||
| 12 | ENTRY(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 | |
| 70e34eb2 JM |
25 | END(ilogbl) |
| 26 | ||
| 27 | .section .note.GNU-stack,"",%progbits |