Home | History | Annotate | Line # | Download | only in gen
fpgetmask.c revision 1.2.12.1
      1 /*	$NetBSD: fpgetmask.c,v 1.2.12.1 2002/01/28 20:50:13 nathanw Exp $	*/
      2 
      3 /*
      4  * Written by J.T. Conklin, Apr 10, 1995
      5  * Public domain.
      6  */
      7 
      8 #include <sys/cdefs.h>
      9 
     10 #include "namespace.h"
     11 
     12 #include <ieeefp.h>
     13 
     14 #ifdef __weak_alias
     15 __weak_alias(fpgetmask,_fpgetmask)
     16 #endif
     17 
     18 fp_except
     19 fpgetmask()
     20 {
     21 	int x;
     22 
     23 	__asm__("st %%fsr,%0" : "=m" (*&x));
     24 	return (x >> 23) & 0x1f;
     25 }
     26