summaryrefslogtreecommitdiffstats
path: root/lib/libc/arch/sparc64/gen/fpgetsticky.c
blob: ecca2eda3dc2fa2b944e23f0dcaee2cd1f38c681 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*	$OpenBSD: fpgetsticky.c,v 1.1 2001/08/29 01:34:56 art Exp $	*/

/*
 * Written by J.T. Conklin, Apr 10, 1995
 * Public domain.
 */

#include <ieeefp.h>

fp_except
fpgetsticky()
{
	int x;

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