Mercurial > mxe-octave
comparison src/build-msvctools/math/nearbyint.S @ 3061:f8299bb6c872
Initial support for native MSVC compilation.
* add MSVC support files: compiler wrappers and support libraries
* adapt libiconv to work with MSVC
* adapt gettext to work with MSVC
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Mon, 17 Jun 2013 22:43:11 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
3060:cbdf4575016d | 3061:f8299bb6c872 |
---|---|
1 /* | |
2 * Written by J.T. Conklin <jtc@netbsd.org>. | |
3 * Public domain. | |
4 * | |
5 * Adapted for use as nearbyint by Ulrich Drepper <drepper@cygnus.com>. | |
6 * | |
7 * Removed header file dependency for use in libmingwex.a by | |
8 * Danny Smith <dannysmith@users.sourceforge.net> | |
9 */ | |
10 | |
11 .file "nearbyint.S" | |
12 .text | |
13 .align 4 | |
14 .globl _nearbyint | |
15 .def _nearbyint; .scl 2; .type 32; .endef | |
16 _nearbyint: | |
17 fldl 4(%esp) | |
18 pushl %eax | |
19 pushl %ecx | |
20 fnstcw (%esp) | |
21 movl (%esp), %eax | |
22 orl $0x20, %eax | |
23 movl %eax, 4(%esp) | |
24 fldcw 4(%esp) | |
25 frndint | |
26 fclex | |
27 fldcw (%esp) | |
28 popl %ecx | |
29 popl %eax | |
30 ret |