Merge branch 'vendor/MPC'
[dragonfly.git] / lib / libc / i386 / gen / fpgetround.S
1 /*
2  * Written by J.T. Conklin, Apr 4, 1995
3  * Public domain.
4  *
5  * $NetBSD: fpgetround.S,v 1.5 2002/01/13 21:45:43 thorpej Exp $
6  * $DragonFly: src/lib/libc/i386/gen/fpgetround.S,v 1.1 2005/07/26 21:15:19 joerg Exp $
7  */
8
9 #include <machine/asm.h>
10
11 #ifdef WEAK_ALIAS
12 WEAK_ALIAS(fpgetround, _fpgetround)
13 ENTRY(_fpgetround)
14 #else
15 ENTRY(fpgetround)
16 #endif
17         subl $4,%esp
18         fnstcw (%esp)
19         movl (%esp),%eax
20         rorl $10,%eax
21         andl $3,%eax
22         addl $4,%esp
23         ret