Debian Codegraph @

mingw-w64-crt/math/x86/remquo.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 "remquo.S"
9 .text
10 #ifdef __x86_64__
11 .align 8
12 #else
13 .align 4
14 #endif
15 .globl __MINGW_USYMBOL(remquo)
16 __MINGW_USYMBOL(remquo):
17 #ifdef __x86_64__
18 movsd %xmm1,-16(%rsp)
19 fldl -16(%rsp)
20 movsd %xmm0,-16(%rsp)
21 fldl -16(%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 leal (%ecx,%ecx,2),%ecx
34 movl $0xef2a60, %eax
35 shrl %cl, %eax
36 andl $7, %eax
37 movl -12(%rsp), %edx
38 movsd %xmm1,-16(%rsp)
39 xorl -12(%rsp), %edx
40 testl $0x80000000, %edx
41 jz 1f
42 negl %eax
43 1: movl %eax, (%r8)
44
45 fstpl -16(%rsp)
46 movsd -16(%rsp),%xmm0
47 ret
48 #else
49 fldl 4 +8(%esp)
50 fldl 4(%esp)
51 1: fprem1
52 fstsw %ax
53 sahf
54 jp 1b
55 fstp %st(1)
56 movl %eax, %ecx
57 shrl $8, %eax
58 shrl $12, %ecx
59 andl $4, %ecx
60 andl $3, %eax
61 orl %eax, %ecx
62 leal (%ecx,%ecx,2),%ecx
63 movl $0xef2a60, %eax
64 shrl %cl, %eax
65 andl $7, %eax
66 movl 4 +8 +8(%esp), %ecx
67 movl 4 +4(%esp), %edx
68 xorl 4 +8 +4(%esp), %edx
69 testl $0x80000000, %edx
70 jz 1f
71 negl %eax
72 1: movl %eax, (%ecx)
73
74 ret
75 #endif