clarify the purpose of this project
[nyanglibc.git] / posix / spawn_faction_addfchdir.s
blobd2f2d8c1398b00474e18d314e0c8b8ed998d3e1f
1 .text
2 .p2align 4,,15
3 .globl posix_spawn_file_actions_addfchdir_np
4 .type posix_spawn_file_actions_addfchdir_np, @function
5 posix_spawn_file_actions_addfchdir_np:
6 pushq %rbx
7 movq %rdi, %rbx
8 subq $16, %rsp
9 movl 4(%rdi), %edx
10 cmpl (%rdi), %edx
11 je .L7
12 .L2:
13 movslq %edx, %rax
14 addl $1, %edx
15 salq $5, %rax
16 addq 8(%rbx), %rax
17 movl $4, (%rax)
18 movl %esi, 8(%rax)
19 xorl %eax, %eax
20 movl %edx, 4(%rbx)
21 .L1:
22 addq $16, %rsp
23 popq %rbx
24 ret
25 .p2align 4,,10
26 .p2align 3
27 .L7:
28 movl %esi, 12(%rsp)
29 call __posix_spawn_file_actions_realloc
30 movl %eax, %edx
31 movl $12, %eax
32 testl %edx, %edx
33 jne .L1
34 movl 4(%rbx), %edx
35 movl 12(%rsp), %esi
36 jmp .L2
37 .size posix_spawn_file_actions_addfchdir_np, .-posix_spawn_file_actions_addfchdir_np
38 .hidden __posix_spawn_file_actions_realloc