summaryrefslogtreecommitdiffstats
path: root/lib/libc/arch/mips64/gen/fpgetmask.c
blob: 75b39d58472b8a8f51c79459038cc38d2e9d46c7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/*	$OpenBSD: fpgetmask.c,v 1.2 2005/08/07 16:40:15 espie Exp $ */
/*
 * Written by J.T. Conklin, Apr 11, 1995
 * Public domain.
 */

#include <ieeefp.h>

fp_except
fpgetmask()
{
	int x;

	__asm__("cfc1 %0,$31" : "=r" (x));
	return (x >> 7) & 0x1f;
}