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