summaryrefslogtreecommitdiff
path: root/lib/libc/arch/m88k/gen/fpgetsticky.c
blob: 05258e4b8e0f2cec3b16e6cc17d5b9848f385b64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*	$OpenBSD: fpgetsticky.c,v 1.3 2005/08/07 16:40:14 espie Exp $	*/

/*
 * Written by J.T. Conklin, Apr 10, 1995
 * Public domain.
 * Ported to 88k by Nivas Madhur
 */

#include <ieeefp.h>

fp_except
fpgetsticky()
{
	int x;

	__asm__ volatile("fldcr %0,fcr62" : "=r" (x));
	return x & 0x1f;
}