clarify the purpose of this project
[nyanglibc.git] / io / file_change_detection.shared.s
bloba778b906d57c32f94c9342ab0c0ca9ab423dfd6b
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 #NO_APP
7 .p2align 4,,15
8 .globl __GI___file_is_unchanged
9 .hidden __GI___file_is_unchanged
10 .type __GI___file_is_unchanged, @function
11 __GI___file_is_unchanged:
12 movq (%rdi), %rdx
13 xorl %eax, %eax
14 testq %rdx, %rdx
15 js .L1
16 movq (%rsi), %rcx
17 testq %rcx, %rcx
18 js .L1
19 testq %rdx, %rdx
20 jne .L3
21 testq %rcx, %rcx
22 sete %al
23 ret
24 .p2align 4,,10
25 .p2align 3
26 .L3:
27 cmpq %rcx, %rdx
28 jne .L1
29 movq 8(%rsi), %rcx
30 cmpq %rcx, 8(%rdi)
31 jne .L1
32 movq 16(%rsi), %rcx
33 cmpq %rcx, 16(%rdi)
34 jne .L1
35 movq 24(%rsi), %rcx
36 cmpq %rcx, 24(%rdi)
37 jne .L1
38 movq 32(%rsi), %rcx
39 cmpq %rcx, 32(%rdi)
40 jne .L1
41 movq 40(%rsi), %rax
42 cmpq %rax, 40(%rdi)
43 sete %al
44 .L1:
45 rep ret
46 .size __GI___file_is_unchanged, .-__GI___file_is_unchanged
47 .globl __file_is_unchanged
48 .set __file_is_unchanged,__GI___file_is_unchanged
49 .p2align 4,,15
50 .globl __GI___file_change_detection_for_stat
51 .hidden __GI___file_change_detection_for_stat
52 .type __GI___file_change_detection_for_stat, @function
53 __GI___file_change_detection_for_stat:
54 movl 24(%rsi), %eax
55 andl $61440, %eax
56 cmpl $16384, %eax
57 je .L18
58 cmpl $32768, %eax
59 je .L17
60 movq $-1, (%rdi)
61 ret
62 .p2align 4,,10
63 .p2align 3
64 .L17:
65 movq 48(%rsi), %rax
66 movdqu 88(%rsi), %xmm0
67 movq %rax, (%rdi)
68 movq 8(%rsi), %rax
69 movups %xmm0, 16(%rdi)
70 movdqu 104(%rsi), %xmm0
71 movq %rax, 8(%rdi)
72 movups %xmm0, 32(%rdi)
73 ret
74 .p2align 4,,10
75 .p2align 3
76 .L18:
77 movq $0, (%rdi)
78 ret
79 .size __GI___file_change_detection_for_stat, .-__GI___file_change_detection_for_stat
80 .globl __file_change_detection_for_stat
81 .set __file_change_detection_for_stat,__GI___file_change_detection_for_stat
82 .p2align 4,,15
83 .globl __GI___file_change_detection_for_path
84 .hidden __GI___file_change_detection_for_path
85 .type __GI___file_change_detection_for_path, @function
86 __GI___file_change_detection_for_path:
87 pushq %rbx
88 movq %rdi, %rbx
89 movq %rsi, %rdi
90 subq $144, %rsp
91 movq %rsp, %rsi
92 call __GI___stat64
93 testl %eax, %eax
94 je .L20
95 movq __libc_errno@gottpoff(%rip), %rax
96 movl %fs:(%rax), %edx
97 xorl %eax, %eax
98 cmpl $40, %edx
99 ja .L19
100 movabsq $1099514781702, %rcx
101 btq %rdx, %rcx
102 jc .L28
103 .L19:
104 addq $144, %rsp
105 popq %rbx
107 .p2align 4,,10
108 .p2align 3
109 .L20:
110 movl 24(%rsp), %eax
111 andl $61440, %eax
112 cmpl $16384, %eax
113 je .L28
114 cmpl $32768, %eax
115 je .L23
116 movq $-1, (%rbx)
117 addq $144, %rsp
118 movl $1, %eax
119 popq %rbx
121 .p2align 4,,10
122 .p2align 3
123 .L28:
124 movq $0, (%rbx)
125 addq $144, %rsp
126 movl $1, %eax
127 popq %rbx
129 .p2align 4,,10
130 .p2align 3
131 .L23:
132 movq 48(%rsp), %rax
133 movdqu 88(%rsp), %xmm0
134 movq %rax, (%rbx)
135 movq 8(%rsp), %rax
136 movups %xmm0, 16(%rbx)
137 movdqu 104(%rsp), %xmm0
138 movq %rax, 8(%rbx)
139 movl $1, %eax
140 movups %xmm0, 32(%rbx)
141 jmp .L19
142 .size __GI___file_change_detection_for_path, .-__GI___file_change_detection_for_path
143 .globl __file_change_detection_for_path
144 .set __file_change_detection_for_path,__GI___file_change_detection_for_path
145 .p2align 4,,15
146 .globl __GI___file_change_detection_for_fp
147 .hidden __GI___file_change_detection_for_fp
148 .type __GI___file_change_detection_for_fp, @function
149 __GI___file_change_detection_for_fp:
150 testq %rsi, %rsi
151 je .L39
152 pushq %rbx
153 movq %rdi, %rbx
154 movq %rsi, %rdi
155 subq $144, %rsp
156 call __GI___fileno
157 movq %rsp, %rsi
158 movl %eax, %edi
159 call __GI___fstat64
160 movl %eax, %edx
161 xorl %eax, %eax
162 testl %edx, %edx
163 je .L40
164 .L29:
165 addq $144, %rsp
166 popq %rbx
168 .p2align 4,,10
169 .p2align 3
170 .L40:
171 movl 24(%rsp), %eax
172 andl $61440, %eax
173 cmpl $16384, %eax
174 je .L41
175 cmpl $32768, %eax
176 je .L34
177 movq $-1, (%rbx)
178 addq $144, %rsp
179 movl $1, %eax
180 popq %rbx
182 .p2align 4,,10
183 .p2align 3
184 .L39:
185 movq $0, (%rdi)
186 movl $1, %eax
188 .p2align 4,,10
189 .p2align 3
190 .L41:
191 movq $0, (%rbx)
192 movl $1, %eax
193 jmp .L29
194 .p2align 4,,10
195 .p2align 3
196 .L34:
197 movq 48(%rsp), %rax
198 movdqu 88(%rsp), %xmm0
199 movq %rax, (%rbx)
200 movq 8(%rsp), %rax
201 movups %xmm0, 16(%rbx)
202 movdqu 104(%rsp), %xmm0
203 movq %rax, 8(%rbx)
204 movl $1, %eax
205 movups %xmm0, 32(%rbx)
206 jmp .L29
207 .size __GI___file_change_detection_for_fp, .-__GI___file_change_detection_for_fp
208 .globl __file_change_detection_for_fp
209 .set __file_change_detection_for_fp,__GI___file_change_detection_for_fp