xref: /netbsd-src/lib/libc/arch/mips/gen/fpgetround.c (revision 2a399c6883d870daece976daec6ffa7bb7f934ce)
1 /*	$NetBSD: fpgetround.c,v 1.2 1996/09/16 18:10:45 jonathan Exp $	*/
2 
3 /*
4  * Written by J.T. Conklin, Apr 11, 1995
5  * Public domain.
6  */
7 
8 #include <ieeefp.h>
9 
10 fp_rnd
11 fpgetround()
12 {
13 	int x;
14 
15 	__asm__("cfc1 %0,$31" : "=r" (x));
16 	return x & 0x03;
17 }
18