Home | History | Annotate | Line # | Download | only in gen
fpgetsticky.c revision 1.1.12.1
      1  1.1.12.1  nathanw /*	$NetBSD: fpgetsticky.c,v 1.1.12.1 2002/01/28 20:50:18 nathanw 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.1.12.1  nathanw #include <sys/cdefs.h>
      9  1.1.12.1  nathanw 
     10  1.1.12.1  nathanw #include "namespace.h"
     11  1.1.12.1  nathanw 
     12       1.1      eeh #include <ieeefp.h>
     13  1.1.12.1  nathanw 
     14  1.1.12.1  nathanw #ifdef __weak_alias
     15  1.1.12.1  nathanw __weak_alias(fpgetsticky,_fpgetsticky)
     16  1.1.12.1  nathanw #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