| 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 <libm-alias-ldouble.h> |
| 8 | #include <machine/asm.h> |
| 9 | |
| 10 | ENTRY(__nearbyintl) |
| 11 | fldt 8(%rsp) |
| 12 | fnstenv -28(%rsp) |
| 13 | frndint |
| 14 | fnstsw |
| 15 | andl $0x1, %eax |
| 16 | orl %eax, -24(%rsp) |
| 17 | fldenv -28(%rsp) |
| 18 | ret |
| 19 | END (__nearbyintl) |
| 20 | libm_alias_ldouble (__nearbyint, nearbyint) |
| 21 |