Annotation of src/lib/libc/arch/x86_64/gen/fpgetround.S, Revision 1.4
1.4 ! christos 1: /* $NetBSD: fpgetround.S,v 1.3 2002/06/12 19:17:22 fvdl Exp $ */
1.1 fvdl 2:
3: /*
4: * Written by J.T. Conklin, Apr 4, 1995
5: * Public domain.
6: */
7:
8: #include <machine/asm.h>
1.3 fvdl 9:
10: /*
1.4 ! christos 11: * XXX load only x87 state. If an application only uses the fp*
1.3 fvdl 12: * interface, this should be in sync with the SSE mxcsr register.
13: */
1.1 fvdl 14:
1.2 thorpej 15: #ifdef WEAK_ALIAS
16: WEAK_ALIAS(fpgetround, _fpgetround)
17: ENTRY(_fpgetround)
18: #else
1.1 fvdl 19: ENTRY(fpgetround)
1.2 thorpej 20: #endif
1.1 fvdl 21: fnstcw -4(%rsp)
1.4 ! christos 22: movl -4(%rsp), %eax
! 23: andl $0x00000c00, %eax
1.1 fvdl 24: ret
CVSweb <webmaster@jp.NetBSD.org>