Home | History | Annotate | Line # | Download | only in gen
fpgetround.S revision 1.2
      1  1.2  thorpej /*	$NetBSD: fpgetround.S,v 1.2 2002/01/13 21:45:51 thorpej Exp $	*/
      2  1.1     fvdl 
      3  1.1     fvdl /*
      4  1.1     fvdl  * Written by J.T. Conklin, Apr 4, 1995
      5  1.1     fvdl  * Public domain.
      6  1.1     fvdl  */
      7  1.1     fvdl 
      8  1.1     fvdl #include <machine/asm.h>
      9  1.1     fvdl 
     10  1.2  thorpej #ifdef WEAK_ALIAS
     11  1.2  thorpej WEAK_ALIAS(fpgetround, _fpgetround)
     12  1.2  thorpej ENTRY(_fpgetround)
     13  1.2  thorpej #else
     14  1.1     fvdl ENTRY(fpgetround)
     15  1.2  thorpej #endif
     16  1.1     fvdl 	fnstcw -4(%rsp)
     17  1.1     fvdl 	movl -4(%rsp),%eax
     18  1.1     fvdl 	rorl $10,%eax
     19  1.1     fvdl 	andl $3,%eax
     20  1.1     fvdl 	ret
     21