OSDN Git Service

Make <winnetwk.h> header effectively self-contained.
[mingw/mingw-org-wsl.git] / mingwrt / mingwex / math / remquol.s
1 /*
2  * Written by Ulrich Drepper <drepper@cygnus.com>.
3  * Based on e_remainder by J.T. Conklin <jtc@netbsd.org>.
4  * Removed header file dependency for use in libmingwex.a by
5  *   Danny Smith <dannysmith@users.sourceforge.net>
6  * Public domain.
7  */
8         .text
9         .align 4;
10 .globl _remquol;
11  _remquol:
12         fldt 4 +12(%esp)
13         fldt 4(%esp)
14 1:      fprem1
15         fstsw %ax
16         sahf
17         jp 1b
18         fstp %st(1)
19         movl %eax, %ecx
20         shrl $8, %eax
21         shrl $12, %ecx
22         andl $4, %ecx
23         andl $3, %eax
24         orl %eax, %ecx
25         movl $0xef2960, %eax
26         shrl %cl, %eax
27         andl $3, %eax
28         movl 4 +12 +12(%esp), %ecx
29         movl 4 +8(%esp), %edx
30         xorl 4 +12 +8(%esp), %edx
31         testl $0x8000, %edx
32         jz 1f
33         negl %eax
34 1:      movl %eax, (%ecx)
35
36         ret