blob: 7dbc2a8b71bbdb6b36c3fe6119f77af04dcd7d54 (
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
29
30
|
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*
* Adaptedfor use as nearbyint by Ulrich Drepper <drepper@cygnus.com>.
*
* Removed header file dependency for use in libmingwex.a by
* Danny Smith <dannysmith@users.sourceforge.net>
*/
.file "nearbyintl.S"
.text
.align 4
.globl _nearbyintl
.def _nearbyintl; .scl 2; .type 32; .endef
_nearbyintl:
fldt 4(%esp)
pushl %eax
pushl %ecx
fnstcw (%esp)
movl (%esp), %eax
orl $0x20, %eax
movl %eax, 4(%esp)
fldcw 4(%esp)
frndint
fclex
fldcw (%esp)
popl %ecx
popl %eax
ret
|