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