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