blob: c934fd31ac0ec9151f188ec618f2e7a91e409718 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/* $NetBSD: fpgetround.S,v 1.7 2014/05/23 02:34:19 uebayasi Exp $ */
/*
* Written by J.T. Conklin, Apr 4, 1995
* Public domain.
*/
#include <machine/asm.h>
/*
* XXX load only x87 state.
*/
#ifdef WEAK_ALIAS
WEAK_ALIAS(fpgetround, _fpgetround)
ENTRY(_fpgetround)
#else
ENTRY(fpgetround)
#endif
fnstcw -4(%esp)
movl -4(%esp), %eax
andl $0x00000c00, %eax
ret
#ifdef WEAK_ALIAS
END(_fpgetround)
#else
END(fpgetround)
#endif
|