| 1 | /* |
|---|---|
| 2 | * Written by J.T. Conklin <jtc@netbsd.org>. |
| 3 | * Public domain. |
| 4 | */ |
| 5 | /* Adapted for use as nearbyint by Ulrich Drepper <drepper@cygnus.com>. */ |
| 6 | |
| 7 | #include <machine/asm.h> |
| 8 | |
| 9 | ENTRY(__nearbyintl) |
| 10 | fldt 8(%rsp) |
| 11 | fnstenv -28(%rsp) |
| 12 | frndint |
| 13 | fnstsw |
| 14 | andl $0x1, %eax |
| 15 | orl %eax, -24(%rsp) |
| 16 | fldenv -28(%rsp) |
| 17 | ret |
| 18 | END (__nearbyintl) |
| 19 | weak_alias (__nearbyintl, nearbyintl) |
| 20 |