xref: /netbsd-src/lib/libc/arch/i386/gen/fpgetround.S (revision 3b01aba77a7a698587faaae455bbfe740923c1f5)
1/*	$NetBSD: fpgetround.S,v 1.4 1998/01/09 03:45:04 perry Exp $	*/
2
3/*
4 * Written by J.T. Conklin, Apr 4, 1995
5 * Public domain.
6 */
7
8#include <machine/asm.h>
9
10ENTRY(fpgetround)
11	subl $4,%esp
12	fnstcw (%esp)
13	movl (%esp),%eax
14	rorl $10,%eax
15	andl $3,%eax
16	addl $4,%esp
17	ret
18