26 lines
366 B
C
26 lines
366 B
C
/* $NetBSD: fpgetmask.c,v 1.3 2002/01/13 21:45:49 thorpej Exp $ */
|
|
|
|
/*
|
|
* Written by J.T. Conklin, Apr 10, 1995
|
|
* Public domain.
|
|
*/
|
|
|
|
#include <sys/cdefs.h>
|
|
|
|
#include "namespace.h"
|
|
|
|
#include <ieeefp.h>
|
|
|
|
#ifdef __weak_alias
|
|
__weak_alias(fpgetmask,_fpgetmask)
|
|
#endif
|
|
|
|
fp_except
|
|
fpgetmask()
|
|
{
|
|
int x;
|
|
|
|
__asm__("st %%fsr,%0" : "=m" (*&x));
|
|
return (x >> 23) & 0x1f;
|
|
}
|