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