clarify the purpose of this project
[nyanglibc.git] / posix / spawn_faction_addclose.s
blob54dc7905dc01a826000a7a8a20b78f1b70605660
1 .text
2 .p2align 4,,15
3 .globl __posix_spawn_file_actions_addclose
4 .hidden __posix_spawn_file_actions_addclose
5 .type __posix_spawn_file_actions_addclose, @function
6 __posix_spawn_file_actions_addclose:
7 pushq %rbp
8 pushq %rbx
9 movq %rdi, %rbx
10 movl %esi, %edi
11 movl %esi, %ebp
12 subq $8, %rsp
13 call __spawn_valid_fd
14 testb %al, %al
15 movl $9, %edx
16 je .L1
17 movl 4(%rbx), %edx
18 cmpl (%rbx), %edx
19 je .L9
20 .L3:
21 movslq %edx, %rax
22 addl $1, %edx
23 salq $5, %rax
24 addq 8(%rbx), %rax
25 movl $0, (%rax)
26 movl %ebp, 8(%rax)
27 movl %edx, 4(%rbx)
28 xorl %edx, %edx
29 .L1:
30 addq $8, %rsp
31 movl %edx, %eax
32 popq %rbx
33 popq %rbp
34 ret
35 .p2align 4,,10
36 .p2align 3
37 .L9:
38 movq %rbx, %rdi
39 call __posix_spawn_file_actions_realloc
40 testl %eax, %eax
41 movl $12, %edx
42 jne .L1
43 movl 4(%rbx), %edx
44 jmp .L3
45 .size __posix_spawn_file_actions_addclose, .-__posix_spawn_file_actions_addclose
46 .weak posix_spawn_file_actions_addclose
47 .set posix_spawn_file_actions_addclose,__posix_spawn_file_actions_addclose
48 .hidden __posix_spawn_file_actions_realloc
49 .hidden __spawn_valid_fd