clarify the purpose of this project
[nyanglibc.git] / posix / sysconf.shared.s.in
bloba8611ebf36fd390e20776ce0929bc37f3cd1ac1c
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 .section .rodata.str1.8,"aMS",@progbits,1
7 .align 8
8 .LC0:
9 .string "CONF_PREFIX/libexec/getconf"
10 .section .rodata.str1.1,"aMS",@progbits,1
11 .LC1:
12 .string "GETCONF_DIR"
13 #NO_APP
14 .text
15 .p2align 4,,15
16 .type __sysconf_check_spec, @function
17 __sysconf_check_spec:
18 .LFB78:
19 pushq %rbp
20 movq %rsp, %rbp
21 pushq %r15
22 pushq %r14
23 pushq %r13
24 pushq %r12
25 movq %rdi, %r13
26 pushq %rbx
27 leaq .LC1(%rip), %rdi
28 subq $152, %rsp
29 movq __libc_errno@gottpoff(%rip), %rax
30 movl %fs:(%rax), %r12d
31 call __GI___libc_secure_getenv
32 testq %rax, %rax
33 je .L4
34 movq %rax, %rdi
35 movq %rax, %r15
36 call __GI_strlen
37 movq %rax, %rbx
38 .L2:
39 movq %r13, %rdi
40 call __GI_strlen
41 movq %rax, %r14
42 leaq 26(%rbx,%rax), %rax
43 movq %rbx, %rdx
44 movq %r15, %rsi
45 andq $-16, %rax
46 subq %rax, %rsp
47 movq %rsp, %rdi
48 call __GI_mempcpy
49 movl $24374, %edx
50 movabsq $6223790282002878511, %rcx
51 leaq 10(%rax), %rdi
52 movw %dx, 8(%rax)
53 leaq 1(%r14), %rdx
54 movq %rcx, (%rax)
55 movq %r13, %rsi
56 call __GI_memcpy@PLT
57 leaq -192(%rbp), %rsi
58 movq %rsp, %rdi
59 call __GI___stat64
60 movq __libc_errno@gottpoff(%rip), %rcx
61 cltq
62 sarq $63, %rax
63 orq $1, %rax
64 movl %r12d, %fs:(%rcx)
65 leaq -40(%rbp), %rsp
66 popq %rbx
67 popq %r12
68 popq %r13
69 popq %r14
70 popq %r15
71 popq %rbp
72 ret
73 .p2align 4,,10
74 .p2align 3
75 .L4:
76 movl $39, %ebx
77 leaq .LC0(%rip), %r15
78 jmp .L2
79 .LFE78:
80 .size __sysconf_check_spec, .-__sysconf_check_spec
81 .section .rodata.str1.1
82 .LC2:
83 .string "/proc/sys/kernel/rtsig-max"
84 .LC3:
85 .string "/proc/sys/kernel/ngroups_max"
86 .LC4:
87 .string "ILP32_OFF32"
88 .LC5:
89 .string "ILP32_OFFBIG"
90 .text
91 .p2align 4,,15
92 .globl __GI___sysconf
93 .hidden __GI___sysconf
94 .type __GI___sysconf, @function
95 __GI___sysconf:
96 .LFB15:
97 pushq %r13
98 pushq %r12
99 pushq %rbp
100 pushq %rbx
101 movl %edi, %ebx
102 leal -185(%rbx), %eax
103 subq $56, %rsp
104 cmpl $14, %eax
105 jbe .L96
106 cmpl $34, %ebx
107 je .L12
108 jg .L13
109 testl %ebx, %ebx
110 je .L14
111 cmpl $3, %ebx
112 jne .L11
113 leaq .LC3(%rip), %rdi
114 xorl %eax, %eax
115 movl $524288, %esi
116 call __GI___open_nocancel
117 movl %eax, %r12d
118 movl $65536, %eax
119 cmpl $-1, %r12d
120 je .L8
121 leaq 16(%rsp), %r13
122 jmp .L21
123 .p2align 4,,10
124 .p2align 3
125 .L98:
126 movq __libc_errno@gottpoff(%rip), %rax
127 cmpl $4, %fs:(%rax)
128 jne .L97
129 .L21:
130 movl $31, %edx
131 movq %r13, %rsi
132 movl %r12d, %edi
133 call __GI___read_nocancel
134 cmpq $-1, %rax
135 movq %rax, %rbp
136 je .L98
137 movl %r12d, %edi
138 call __GI___close_nocancel
139 testq %rbp, %rbp
140 jle .L11
141 leaq 8(%rsp), %rsi
142 movl $10, %edx
143 movq %r13, %rdi
144 movb $0, 16(%rsp,%rbp)
145 call __GI_strtol
146 movq 8(%rsp), %rdx
147 cmpq %r13, %rdx
148 je .L11
149 movzbl (%rdx), %edx
150 testb %dl, %dl
151 je .L8
152 cmpb $10, %dl
153 je .L8
154 .p2align 4,,10
155 .p2align 3
156 .L11:
157 cmpl $246, %ebx
158 ja .L26
159 leaq .L27(%rip), %rdx
160 movslq (%rdx,%rbx,4), %rax
161 addq %rdx, %rax
162 jmp *%rax
163 .section .rodata
164 .align 4
165 .align 4
166 .L27:
167 .long .L95-.L27
168 .long .L28-.L27
169 .long .L29-.L27
170 .long .L30-.L27
171 .long .L31-.L27
172 .long .L67-.L27
173 .long .L95-.L27
174 .long .L79-.L27
175 .long .L79-.L27
176 .long .L16-.L27
177 .long .L16-.L27
178 .long .L16-.L27
179 .long .L16-.L27
180 .long .L16-.L27
181 .long .L16-.L27
182 .long .L16-.L27
183 .long .L16-.L27
184 .long .L16-.L27
185 .long .L16-.L27
186 .long .L16-.L27
187 .long .L16-.L27
188 .long .L16-.L27
189 .long .L16-.L27
190 .long .L95-.L27
191 .long .L95-.L27
192 .long .L68-.L27
193 .long .L76-.L27
194 .long .L95-.L27
195 .long .L37-.L27
196 .long .L16-.L27
197 .long .L38-.L27
198 .long .L66-.L27
199 .long .L95-.L27
200 .long .L76-.L27
201 .long .L95-.L27
202 .long .L95-.L27
203 .long .L40-.L27
204 .long .L75-.L27
205 .long .L40-.L27
206 .long .L42-.L27
207 .long .L71-.L27
208 .long .L26-.L27
209 .long .L66-.L27
210 .long .L75-.L27
211 .long .L69-.L27
212 .long .L75-.L27
213 .long .L16-.L27
214 .long .L16-.L27
215 .long .L16-.L27
216 .long .L95-.L27
217 .long .L95-.L27
218 .long .L16-.L27
219 .long .L16-.L27
220 .long .L95-.L27
221 .long .L95-.L27
222 .long .L95-.L27
223 .long .L95-.L27
224 .long .L95-.L27
225 .long .L95-.L27
226 .long .L95-.L27
227 .long .L46-.L27
228 .long .L95-.L27
229 .long .L95-.L27
230 .long .L95-.L27
231 .long .L95-.L27
232 .long .L95-.L27
233 .long .L95-.L27
234 .long .L16-.L27
235 .long .L16-.L27
236 .long .L46-.L27
237 .long .L46-.L27
238 .long .L47-.L27
239 .long .L66-.L27
240 .long .L58-.L27
241 .long .L46-.L27
242 .long .L50-.L27
243 .long .L95-.L27
244 .long .L16-.L27
245 .long .L16-.L27
246 .long .L16-.L27
247 .long .L16-.L27
248 .long .L16-.L27
249 .long .L16-.L27
250 .long .L51-.L27
251 .long .L52-.L27
252 .long .L53-.L27
253 .long .L54-.L27
254 .long .L76-.L27
255 .long .L56-.L27
256 .long .L57-.L27
257 .long .L58-.L27
258 .long .L79-.L27
259 .long .L95-.L27
260 .long .L79-.L27
261 .long .L79-.L27
262 .long .L16-.L27
263 .long .L16-.L27
264 .long .L95-.L27
265 .long .L79-.L27
266 .long .L79-.L27
267 .long .L79-.L27
268 .long .L60-.L27
269 .long .L61-.L27
270 .long .L62-.L27
271 .long .L76-.L27
272 .long .L64-.L27
273 .long .L80-.L27
274 .long .L66-.L27
275 .long .L67-.L27
276 .long .L68-.L27
277 .long .L69-.L27
278 .long .L61-.L27
279 .long .L62-.L27
280 .long .L69-.L27
281 .long .L70-.L27
282 .long .L71-.L27
283 .long .L72-.L27
284 .long .L95-.L27
285 .long .L73-.L27
286 .long .L74-.L27
287 .long .L75-.L27
288 .long .L76-.L27
289 .long .L76-.L27
290 .long .L76-.L27
291 .long .L76-.L27
292 .long .L77-.L27
293 .long .L78-.L27
294 .long .L79-.L27
295 .long .L95-.L27
296 .long .L79-.L27
297 .long .L79-.L27
298 .long .L79-.L27
299 .long .L16-.L27
300 .long .L16-.L27
301 .long .L95-.L27
302 .long .L95-.L27
303 .long .L95-.L27
304 .long .L16-.L27
305 .long .L95-.L27
306 .long .L95-.L27
307 .long .L95-.L27
308 .long .L95-.L27
309 .long .L95-.L27
310 .long .L95-.L27
311 .long .L95-.L27
312 .long .L95-.L27
313 .long .L95-.L27
314 .long .L95-.L27
315 .long .L95-.L27
316 .long .L95-.L27
317 .long .L95-.L27
318 .long .L95-.L27
319 .long .L95-.L27
320 .long .L16-.L27
321 .long .L16-.L27
322 .long .L79-.L27
323 .long .L95-.L27
324 .long .L79-.L27
325 .long .L95-.L27
326 .long .L16-.L27
327 .long .L95-.L27
328 .long .L95-.L27
329 .long .L95-.L27
330 .long .L95-.L27
331 .long .L16-.L27
332 .long .L95-.L27
333 .long .L95-.L27
334 .long .L95-.L27
335 .long .L95-.L27
336 .long .L95-.L27
337 .long .L95-.L27
338 .long .L95-.L27
339 .long .L95-.L27
340 .long .L95-.L27
341 .long .L95-.L27
342 .long .L95-.L27
343 .long .L77-.L27
344 .long .L78-.L27
345 .long .L79-.L27
346 .long .L95-.L27
347 .long .L80-.L27
348 .long .L95-.L27
349 .long .L95-.L27
350 .long .L95-.L27
351 .long .L95-.L27
352 .long .L26-.L27
353 .long .L26-.L27
354 .long .L26-.L27
355 .long .L26-.L27
356 .long .L26-.L27
357 .long .L26-.L27
358 .long .L26-.L27
359 .long .L26-.L27
360 .long .L26-.L27
361 .long .L26-.L27
362 .long .L26-.L27
363 .long .L26-.L27
364 .long .L26-.L27
365 .long .L26-.L27
366 .long .L26-.L27
367 .long .L26-.L27
368 .long .L26-.L27
369 .long .L26-.L27
370 .long .L26-.L27
371 .long .L26-.L27
372 .long .L26-.L27
373 .long .L26-.L27
374 .long .L26-.L27
375 .long .L26-.L27
376 .long .L26-.L27
377 .long .L26-.L27
378 .long .L26-.L27
379 .long .L26-.L27
380 .long .L26-.L27
381 .long .L26-.L27
382 .long .L26-.L27
383 .long .L26-.L27
384 .long .L26-.L27
385 .long .L26-.L27
386 .long .L26-.L27
387 .long .L26-.L27
388 .long .L26-.L27
389 .long .L26-.L27
390 .long .L26-.L27
391 .long .L26-.L27
392 .long .L26-.L27
393 .long .L26-.L27
394 .long .L26-.L27
395 .long .L26-.L27
396 .long .L26-.L27
397 .long .L26-.L27
398 .long .L26-.L27
399 .long .L26-.L27
400 .long .L26-.L27
401 .long .L26-.L27
402 .long .L16-.L27
403 .long .L16-.L27
404 .long .L77-.L27
405 .long .L78-.L27
406 .long .L79-.L27
407 .long .L95-.L27
408 .long .L26-.L27
409 .long .L95-.L27
410 .long .L95-.L27
411 .long .L95-.L27
412 .long .L95-.L27
413 .long .L95-.L27
414 .text
415 .p2align 4,,10
416 .p2align 3
417 .L96:
418 movl %ebx, %edi
419 call __cache_sysconf
420 .L8:
421 addq $56, %rsp
422 popq %rbx
423 popq %rbp
424 popq %r12
425 popq %r13
427 .p2align 4,,10
428 .p2align 3
429 .L14:
430 leaq 16(%rsp), %rsi
431 movl $3, %edi
432 call __GI___getrlimit
433 movl %eax, %edx
434 movl $131072, %eax
435 testl %edx, %edx
436 jne .L8
437 movq 16(%rsp), %rdx
438 movq %rdx, %rcx
439 shrq $2, %rcx
440 cmpq $524287, %rdx
441 cmova %rcx, %rax
442 jmp .L8
443 .p2align 4,,10
444 .p2align 3
445 .L12:
446 leaq 16(%rsp), %r13
447 movl $11, %edi
448 movq %r13, %rsi
449 call __GI___getrlimit
450 testl %eax, %eax
451 je .L99
452 leaq .LC2(%rip), %rdi
453 xorl %eax, %eax
454 movl $524288, %esi
455 call __GI___open_nocancel
456 cmpl $-1, %eax
457 movl %eax, %r12d
458 jne .L21
459 .L95:
460 movq $-1, %rax
461 jmp .L8
462 .p2align 4,,10
463 .p2align 3
464 .L13:
465 cmpl $138, %ebx
466 jl .L11
467 cmpl $139, %ebx
468 jle .L16
469 cmpl $149, %ebx
470 jne .L11
471 .L16:
472 addq $56, %rsp
473 movl $200809, %eax
474 popq %rbx
475 popq %rbp
476 popq %r12
477 popq %r13
479 .p2align 4,,10
480 .p2align 3
481 .L97:
482 movl %r12d, %edi
483 call __GI___close_nocancel
484 jmp .L11
485 .p2align 4,,10
486 .p2align 3
487 .L79:
488 movl $1, %eax
489 jmp .L8
490 .p2align 4,,10
491 .p2align 3
492 .L76:
493 movl $2147483647, %eax
494 jmp .L8
495 .L66:
496 movl $32, %eax
497 jmp .L8
498 .L46:
499 movl $1024, %eax
500 jmp .L8
501 .L75:
502 movl $2048, %eax
503 jmp .L8
504 .L69:
505 movl $32767, %eax
506 jmp .L8
507 .L77:
508 leaq .LC4(%rip), %rdi
509 call __sysconf_check_spec
510 jmp .L8
511 .L78:
512 leaq .LC5(%rip), %rdi
513 call __sysconf_check_spec
514 jmp .L8
515 .L61:
516 movl $127, %eax
517 jmp .L8
518 .L58:
519 movl $4, %eax
520 jmp .L8
521 .L71:
522 movl $255, %eax
523 jmp .L8
524 .L40:
525 movl $99, %eax
526 jmp .L8
527 .L80:
528 movl $64, %eax
529 jmp .L8
530 .L62:
531 movq $-128, %rax
532 jmp .L8
533 .L68:
534 movl $20, %eax
535 jmp .L8
536 .L67:
537 movl $16, %eax
538 jmp .L8
539 .L60:
540 movl $8, %eax
541 jmp .L8
542 .L42:
543 movl $1000, %eax
544 jmp .L8
545 .L37:
546 movl $32768, %eax
547 jmp .L8
548 .L52:
549 call __GI___get_nprocs
550 cltq
551 jmp .L8
552 .L38:
553 call __GI___getpagesize
554 cltq
555 jmp .L8
556 .L54:
557 call __GI___get_avphys_pages
558 jmp .L8
559 .L73:
560 movl $65535, %eax
561 jmp .L8
562 .L50:
563 movl $16384, %eax
564 jmp .L8
565 .L51:
566 call __GI___get_nprocs_conf
567 cltq
568 jmp .L8
569 .L70:
570 movq $-32768, %rax
571 jmp .L8
572 .L72:
573 movl $4294967295, %eax
574 jmp .L8
575 .L53:
576 call __GI___get_phys_pages
577 jmp .L8
578 .L64:
579 movq $-2147483648, %rax
580 jmp .L8
581 .L57:
582 movl $700, %eax
583 jmp .L8
584 .L56:
585 movl $8192, %eax
586 jmp .L8
587 .L31:
588 call __getdtablesize
589 cltq
590 jmp .L8
591 .L74:
592 movl $4096, %eax
593 jmp .L8
594 .L47:
595 movl $256, %eax
596 jmp .L8
597 .L29:
598 call __getclktck
599 cltq
600 jmp .L8
601 .L28:
602 call __get_child_max
603 jmp .L8
604 .L26:
605 movq __libc_errno@gottpoff(%rip), %rax
606 movl $22, %fs:(%rax)
607 jmp .L95
608 .p2align 4,,10
609 .p2align 3
610 .L99:
611 movq 16(%rsp), %rax
612 jmp .L8
613 .L30:
614 movl $65536, %eax
615 jmp .L8
616 .LFE15:
617 .size __GI___sysconf, .-__GI___sysconf
618 .weak sysconf
619 .set sysconf,__GI___sysconf
620 .globl __sysconf
621 .set __sysconf,__GI___sysconf
622 .hidden __get_child_max
623 .hidden __getclktck
624 .hidden __getdtablesize
625 .hidden __cache_sysconf