xref: /openbsd/lib/libc/arch/m88k/gen/fpgetsticky.c (revision 17df1aa7)
1 /*	$OpenBSD: fpgetsticky.c,v 1.3 2005/08/07 16:40:14 espie Exp $	*/
2 
3 /*
4  * Written by J.T. Conklin, Apr 10, 1995
5  * Public domain.
6  * Ported to 88k by Nivas Madhur
7  */
8 
9 #include <ieeefp.h>
10 
11 fp_except
12 fpgetsticky()
13 {
14 	int x;
15 
16 	__asm__ volatile("fldcr %0,fcr62" : "=r" (x));
17 	return x & 0x1f;
18 }
19