clarify the purpose of this project
[nyanglibc.git] / posix / fpathconf.shared.s
blobaa1e2b6538566c2c6a0635948d48416f4490c5ac
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 __fpathconf
9 .type __fpathconf, @function
10 __fpathconf:
11 .LFB4:
12 pushq %r12
13 pushq %rbp
14 pushq %rbx
15 movl %edi, %ebx
16 subq $144, %rsp
17 cmpl $6, %esi
18 je .L3
19 jle .L40
20 cmpl $13, %esi
21 je .L6
22 cmpl $20, %esi
23 jne .L2
24 movq %rsp, %rbp
25 movq %rbp, %rsi
26 call __fstatfs
27 movq %rbp, %rsi
28 movl %eax, %edi
29 call __statfs_symlinks
30 .L1:
31 addq $144, %rsp
32 popq %rbx
33 popq %rbp
34 popq %r12
35 ret
36 .p2align 4,,10
37 .p2align 3
38 .L6:
39 movq %rsp, %rbp
40 movq %rbp, %rsi
41 call __fstatfs
42 movq %rbp, %rsi
43 movl %eax, %edi
44 call __statfs_filesize_max
45 addq $144, %rsp
46 popq %rbx
47 popq %rbp
48 popq %r12
49 ret
50 .p2align 4,,10
51 .p2align 3
52 .L40:
53 testl %esi, %esi
54 jne .L2
55 movq %rsp, %rbp
56 movq %rbp, %rsi
57 call __fstatfs
58 movl %ebx, %ecx
59 movq %rbp, %rsi
60 xorl %edx, %edx
61 movl %eax, %edi
62 call __statfs_link_max
63 addq $144, %rsp
64 popq %rbx
65 popq %rbp
66 popq %r12
67 ret
68 .p2align 4,,10
69 .p2align 3
70 .L2:
71 testl %ebx, %ebx
72 js .L41
73 cmpl $20, %esi
74 ja .L10
75 leaq .L11(%rip), %rdx
76 movl %esi, %esi
77 movslq (%rdx,%rsi,4), %rax
78 addq %rdx, %rax
79 jmp *%rax
80 .section .rodata
81 .align 4
82 .align 4
83 .L11:
84 .long .L29-.L11
85 .long .L37-.L11
86 .long .L37-.L11
87 .long .L13-.L11
88 .long .L14-.L11
89 .long .L14-.L11
90 .long .L10-.L11
91 .long .L15-.L11
92 .long .L16-.L11
93 .long .L29-.L11
94 .long .L17-.L11
95 .long .L29-.L11
96 .long .L29-.L11
97 .long .L18-.L11
98 .long .L29-.L11
99 .long .L29-.L11
100 .long .L19-.L11
101 .long .L21-.L11
102 .long .L21-.L11
103 .long .L29-.L11
104 .long .L15-.L11
105 .text
106 .p2align 4,,10
107 .p2align 3
108 .L3:
109 movq %rsp, %rbp
110 movq %rbp, %rsi
111 call __fstatfs
112 movq %rbp, %rsi
113 movl %eax, %edi
114 call __statfs_chown_restricted
115 addq $144, %rsp
116 popq %rbx
117 popq %rbp
118 popq %r12
120 .L43:
121 movl %r12d, %fs:0(%rbp)
122 .p2align 4,,10
123 .p2align 3
124 .L37:
125 movl $255, %eax
126 jmp .L1
127 .p2align 4,,10
128 .p2align 3
129 .L15:
130 movl $1, %eax
131 jmp .L1
132 .p2align 4,,10
133 .p2align 3
134 .L21:
135 movq %rsp, %rsi
136 movl %ebx, %edi
137 call __fstatvfs64
138 movl %eax, %edx
139 movq $-1, %rax
140 testl %edx, %edx
141 js .L1
142 movq 8(%rsp), %rax
143 jmp .L1
144 .p2align 4,,10
145 .p2align 3
146 .L14:
147 movl $4096, %eax
148 jmp .L1
149 .p2align 4,,10
150 .p2align 3
151 .L29:
152 movq $-1, %rax
153 jmp .L1
154 .p2align 4,,10
155 .p2align 3
156 .L17:
157 movq %rsp, %rsi
158 movl %ebx, %edi
159 call __GI___fstat64
160 movl %eax, %edx
161 movq $-1, %rax
162 testl %edx, %edx
163 js .L1
164 movl 24(%rsp), %eax
165 andl $61440, %eax
166 subl $24576, %eax
167 andb $-33, %ah
168 cmpl $1, %eax
169 sbbq %rax, %rax
170 andl $2, %eax
171 subq $1, %rax
172 jmp .L1
173 .p2align 4,,10
174 .p2align 3
175 .L19:
176 movq %rsp, %rsi
177 movl %ebx, %edi
178 call __fstatvfs64
179 movl %eax, %edx
180 movq $-1, %rax
181 testl %edx, %edx
182 js .L1
183 movq (%rsp), %rax
184 jmp .L1
185 .p2align 4,,10
186 .p2align 3
187 .L16:
188 xorl %eax, %eax
189 jmp .L1
190 .p2align 4,,10
191 .p2align 3
192 .L13:
193 movq __libc_errno@gottpoff(%rip), %rbp
194 movq %rsp, %rsi
195 movl %ebx, %edi
196 movl %fs:0(%rbp), %r12d
197 call __fstatvfs64
198 testl %eax, %eax
199 js .L42
200 movq 80(%rsp), %rax
201 jmp .L1
202 .p2align 4,,10
203 .p2align 3
204 .L18:
205 movl $32, %eax
206 jmp .L1
207 .p2align 4,,10
208 .p2align 3
209 .L10:
210 movq __libc_errno@gottpoff(%rip), %rax
211 movl $22, %fs:(%rax)
212 movq $-1, %rax
213 jmp .L1
214 .L41:
215 movq __libc_errno@gottpoff(%rip), %rax
216 movl $9, %fs:(%rax)
217 movq $-1, %rax
218 jmp .L1
219 .L42:
220 movl %fs:0(%rbp), %edx
221 cmpl $38, %edx
222 je .L43
223 cmpl $19, %edx
224 movq $-1, %rax
225 jne .L1
226 movl $22, %fs:0(%rbp)
227 jmp .L1
228 .LFE4:
229 .size __fpathconf, .-__fpathconf
230 .weak fpathconf
231 .set fpathconf,__fpathconf
232 .hidden __fstatvfs64
233 .hidden __statfs_chown_restricted
234 .hidden __statfs_link_max
235 .hidden __statfs_filesize_max
236 .hidden __statfs_symlinks
237 .hidden __fstatfs