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