freebsd-nq/lib/libc/sparc64/gen/fpgetmask.c
Thomas Moestl 8579151e4b Add implementations of fpgetmask(), fpgetround(), fpgetsticky(),
fpsetround(), fpsetsticky(), obtained from NetBSD and tweaked a little
to use definitions from machine/fsr.h instead of magic numbers.
2002-09-14 18:06:21 +00:00

23 lines
337 B
C

/* $NetBSD: fpgetmask.c,v 1.2 2002/01/13 21:45:50 thorpej Exp $ */
/*
* Written by J.T. Conklin, Apr 10, 1995
* Public domain.
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <machine/fsr.h>
#include <ieeefp.h>
fp_except_t
fpgetmask()
{
unsigned int x;
__asm__("st %%fsr,%0" : "=m" (x));
return (FSR_GET_TEM(x));
}