2002-01-14 00:45:39 +03:00
|
|
|
/* $NetBSD: fpgetmask.c,v 1.3 2002/01/13 21:45:45 thorpej Exp $ */
|
1996-09-16 22:10:35 +04:00
|
|
|
|
1995-04-11 22:13:49 +04:00
|
|
|
/*
|
|
|
|
* Written by J.T. Conklin, Apr 11, 1995
|
|
|
|
* Public domain.
|
|
|
|
*/
|
|
|
|
|
2002-01-14 00:45:39 +03:00
|
|
|
#include <sys/cdefs.h>
|
|
|
|
|
|
|
|
#include "namespace.h"
|
|
|
|
|
1995-04-11 22:13:49 +04:00
|
|
|
#include <ieeefp.h>
|
|
|
|
|
2002-01-14 00:45:39 +03:00
|
|
|
#ifdef __weak_alias
|
|
|
|
__weak_alias(fpgetmask,_fpgetmask)
|
|
|
|
#endif
|
|
|
|
|
1995-04-11 22:13:49 +04:00
|
|
|
fp_except
|
|
|
|
fpgetmask()
|
|
|
|
{
|
|
|
|
int x;
|
|
|
|
|
|
|
|
__asm__("cfc1 %0,$31" : "=r" (x));
|
|
|
|
return (x >> 7) & 0x1f;
|
|
|
|
}
|