NetBSD/lib/libc/arch/ns32k/gen/fpgetmask.c

27 lines
526 B
C

/* $NetBSD: fpgetmask.c,v 1.3 1997/07/13 18:45:31 christos Exp $ */
/*
* Written by J.T. Conklin, Apr 10, 1995
* Public domain.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: fpgetmask.c,v 1.3 1997/07/13 18:45:31 christos Exp $");
#endif /* LIBC_SCCS and not lint */
#include <ieeefp.h>
#include <machine/cpufunc.h>
#include <machine/fpu.h>
fp_except
fpgetmask()
{
fp_except x;
fp_except ebits = FPC_IEN | FPC_OVE | FPC_IVE | FPC_DZE | FPC_UNDE;
sfsr(x);
return x & ebits;
}