Debian Codegraph @

mingw-w64-crt/math/x86/remquof.S

raw
1 /**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6 #include <_mingw_mac.h>
7
8 .file "remquof.S"
9 .text
10 #ifdef __x86_64__
11 .align 8
12 #else
13 .align 4
14 #endif
15 .globl __MINGW_USYMBOL(remquof)
16 __MINGW_USYMBOL(remquof):
17 #ifdef __x86_64__
18 movss %xmm1,-12(%rsp)
19 flds -12(%rsp)
20 movss %xmm0,-12(%rsp)
21 flds -12(%rsp)
22 1: fprem1
23 fstsw %ax
24 sahf
25 jp 1b
26 fstp %st(1)
27 movl %eax, %ecx
28 shrl $8, %eax
29 shrl $12, %ecx
30 andl $4, %ecx
31 andl $3, %eax
32 orl %eax, %ecx
33 movl $0xef2a60, %eax
34 leal (%ecx,%ecx,2),%ecx
35 shrl %cl, %eax
36 andl $7, %eax
37 movss %xmm0,-12(%rsp)
38 movl -12(%rsp), %edx
39 movss %xmm1,-12(%rsp)
40 xorl -12(%rsp), %edx
41 testl $0x80000000, %edx
42 jz 1f
43 negl %eax
44 1: movl %eax, (%r8)
45
46 fstps -12(%rsp)
47 movss -12(%rsp),%xmm0
48 ret
49 #else
50 flds 4 +4(%esp)
51 flds 4(%esp)
52 1: fprem1
53 fstsw %ax
54 sahf
55 jp 1b
56 fstp %st(1)
57 movl %eax, %ecx
58 shrl $8, %eax
59 shrl $12, %ecx
60 andl $4, %ecx
61 andl $3, %eax
62 orl %eax, %ecx
63 movl $0xef2a60, %eax
64 leal (%ecx,%ecx,2),%ecx
65 shrl %cl, %eax
66 andl $7, %eax
67 movl 4 +4 +4(%esp), %ecx
68 movl 4(%esp), %edx
69 xorl 4 +4(%esp), %edx
70 testl $0x80000000, %edx
71 jz 1f
72 negl %eax
73 1: movl %eax, (%ecx)
74
75 ret
76 #endif