xref: /openbsd-src/lib/libc/arch/i386/gen/fpgetround.S (revision b2ea75c1b17e1a9a339660e7ed45cd24946b230e)
1/*
2 * Written by J.T. Conklin, Apr 4, 1995
3 * Public domain.
4 */
5
6#include <machine/asm.h>
7
8#if defined(LIBC_SCCS)
9	.text
10	.asciz "$OpenBSD: fpgetround.S,v 1.2 1996/08/19 08:12:23 tholo Exp $"
11#endif
12
13ENTRY(fpgetround)
14	subl $4,%esp
15	fnstcw (%esp)
16	movl (%esp),%eax
17	rorl $10,%eax
18	andl $3,%eax
19	addl $4,%esp
20	ret
21