summaryrefslogtreecommitdiffstats
path: root/lib/libc/arch/sparc/gen/fpgetmask.c
blob: b2d0c471162eeb0b0e7787c040881af2260ce4a7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*
 * Written by J.T. Conklin, Apr 10, 1995
 * Public domain.
 */

#include <ieeefp.h>

fp_except
fpgetmask()
{
	int x;

	__asm__("st %%fsr,%0" : "=m" (*&x));
	return (x >> 23) & 0x1f;
}