annotate src/build-msvctools/math/nearbyintf.S @ 7261:27c6fa7e25f3 default tip @

* src/libgcrypt.mk: update to v1.11.0
author John Donoghue <john.donoghue@ieee.org>
date Sat, 22 Jun 2024 08:02:01 -0400
parents f8299bb6c872
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3061
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
1 /*
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
2 * Written by J.T. Conklin <jtc@netbsd.org>.
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
3 * Public domain.
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
4 * Adapted for use as nearbyint by Ulrich Drepper <drepper@cygnus.com>.
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
5 *
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
6 * Removed header file dependency for use in libmingwex.a by
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
7 * Danny Smith <dannysmith@users.sourceforge.net>
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
8 */
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
9
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
10 .file "nearbyintf.S"
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
11 .text
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
12 .align 4
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
13 .globl _nearbyintf
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
14 .def _nearbyintf; .scl 2; .type 32; .endef
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
15 _nearbyintf:
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
16 flds 4(%esp)
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
17 pushl %eax
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
18 pushl %ecx
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
19 fnstcw (%esp)
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
20 movl (%esp), %eax
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
21 orl $0x20, %eax
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
22 movl %eax, 4(%esp)
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
23 fldcw 4(%esp)
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
24 frndint
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
25 fclex
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
26 fldcw (%esp)
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
27 popl %ecx
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
28 popl %eax
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
29 ret