Home | History | Annotate | Line # | Download | only in gen
fpgetround.S revision 1.6.18.1
      1  1.6.18.1       tls /*	$NetBSD: fpgetround.S,v 1.6.18.1 2014/08/10 06:51:49 tls 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.6  christos /*
     11       1.6  christos  * XXX load only x87 state.
     12       1.6  christos  */
     13       1.6  christos 
     14       1.5   thorpej #ifdef WEAK_ALIAS
     15       1.5   thorpej WEAK_ALIAS(fpgetround, _fpgetround)
     16       1.5   thorpej ENTRY(_fpgetround)
     17       1.5   thorpej #else
     18       1.1       jtc ENTRY(fpgetround)
     19       1.5   thorpej #endif
     20       1.6  christos 	fnstcw -4(%esp)
     21       1.6  christos 	movl -4(%esp), %eax
     22       1.6  christos 	andl $0x00000c00, %eax
     23       1.1       jtc 	ret
     24  1.6.18.1       tls #ifdef WEAK_ALIAS
     25  1.6.18.1       tls END(_fpgetround)
     26  1.6.18.1       tls #else
     27  1.6.18.1       tls END(fpgetround)
     28  1.6.18.1       tls #endif
     29