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