xref: /openbsd-src/lib/libc/arch/mips64/gen/fpgetround.c (revision 898184e3e61f9129feb5978fad5a8c6865f00b92)
1 /*	$OpenBSD: fpgetround.c,v 1.2 2005/08/07 16:40:15 espie Exp $ */
2 /*
3  * Written by J.T. Conklin, Apr 11, 1995
4  * Public domain.
5  */
6 
7 #include <ieeefp.h>
8 
9 fp_rnd
10 fpgetround()
11 {
12 	int x;
13 
14 	__asm__("cfc1 %0,$31" : "=r" (x));
15 	return x & 0x03;
16 }
17