Home | History | Annotate | Line # | Download | only in gen
fpgetsticky.S revision 1.3
      1  1.3     fvdl /*	$NetBSD: fpgetsticky.S,v 1.3 2002/06/12 19:17:22 fvdl Exp $	*/
      2  1.1     fvdl 
      3  1.1     fvdl /*
      4  1.3     fvdl  * Written by Frank van der Linden at Wasabi Systems for NetBSD.
      5  1.1     fvdl  * Public domain.
      6  1.3     fvdl  *
      7  1.1     fvdl  */
      8  1.1     fvdl 
      9  1.1     fvdl #include <machine/asm.h>
     10  1.1     fvdl 
     11  1.3     fvdl /*
     12  1.3     fvdl  * XXX read both the x87 and SSE status words here, and OR
     13  1.3     fvdl  * them to get a complete picture of exceptions.
     14  1.3     fvdl  */
     15  1.3     fvdl 
     16  1.2  thorpej #ifdef WEAK_ALIAS
     17  1.2  thorpej WEAK_ALIAS(fpgetsticky, _fpgetsticky)
     18  1.2  thorpej ENTRY(_fpgetsticky)
     19  1.2  thorpej #else
     20  1.1     fvdl ENTRY(fpgetsticky)
     21  1.2  thorpej #endif
     22  1.3     fvdl 	fnstsw	-4(%rsp)
     23  1.3     fvdl 	stmxcsr	-8(%rsp)
     24  1.3     fvdl 	movl	-4(%rsp),%eax
     25  1.3     fvdl 	orl	-8(%rsp),%eax
     26  1.3     fvdl 	andl	$63,%eax
     27  1.1     fvdl 	ret
     28