xref: /openbsd/lib/libc/arch/mips64/gen/fpgetmask.c (revision 3cab2bb3)
1 /*	$OpenBSD: fpgetmask.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_except
10 fpgetmask()
11 {
12 	int x;
13 
14 	__asm__("cfc1 %0,$31" : "=r" (x));
15 	return (x >> 7) & 0x1f;
16 }
17