xref: /openbsd-src/lib/libc/arch/i386/gen/fpgetround.S (revision 2b0358df1d88d06ef4139321dd05bd5e05d91eaf)
1/* $OpeNBSD$ */
2/*
3 * Written by J.T. Conklin, Apr 4, 1995
4 * Public domain.
5 */
6
7#include <machine/asm.h>
8
9ENTRY(fpgetround)
10	subl $4,%esp
11	fnstcw (%esp)
12	movl (%esp),%eax
13	rorl $10,%eax
14	andl $3,%eax
15	addl $4,%esp
16	ret
17