clarify the purpose of this project
[nyanglibc.git] / dirent / rtld-fdopendir.shared.s
blobf94c71dd3f07d97fd503eff68b39d061dc23f443
1 .text
2 .p2align 4,,15
3 .globl __fdopendir
4 .hidden __fdopendir
5 .type __fdopendir, @function
6 __fdopendir:
7 pushq %rbp
8 pushq %rbx
9 movl %edi, %ebx
10 subq $152, %rsp
11 movq %rsp, %rbp
12 movq %rbp, %rsi
13 call __GI___fstat64
14 testl %eax, %eax
15 js .L11
16 movl 24(%rsp), %eax
17 andl $61440, %eax
18 cmpl $16384, %eax
19 jne .L13
20 xorl %eax, %eax
21 movl $3, %esi
22 movl %ebx, %edi
23 call __GI___fcntl64_nocancel
24 cmpl $-1, %eax
25 je .L11
26 movl %eax, %edx
27 andl $3, %edx
28 cmpl $1, %edx
29 je .L14
30 movq %rbp, %rcx
31 movl %eax, %edx
32 xorl %esi, %esi
33 movl %ebx, %edi
34 call __alloc_dir
35 .L1:
36 addq $152, %rsp
37 popq %rbx
38 popq %rbp
39 ret
40 .p2align 4,,10
41 .p2align 3
42 .L13:
43 movl $20, rtld_errno(%rip)
44 .L11:
45 addq $152, %rsp
46 xorl %eax, %eax
47 popq %rbx
48 popq %rbp
49 ret
50 .p2align 4,,10
51 .p2align 3
52 .L14:
53 movl $22, rtld_errno(%rip)
54 xorl %eax, %eax
55 jmp .L1
56 .size __fdopendir, .-__fdopendir
57 .weak fdopendir
58 .set fdopendir,__fdopendir
59 .hidden rtld_errno
60 .hidden __alloc_dir