clarify the purpose of this project
[nyanglibc.git] / posix / spawn_faction_addchdir.shared.s
blobe86d681b16caec9b57af7e1839efc481b2c3ac95
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 posix_spawn_file_actions_addchdir_np
9 .type posix_spawn_file_actions_addchdir_np, @function
10 posix_spawn_file_actions_addchdir_np:
11 pushq %rbp
12 pushq %rbx
13 movq %rdi, %rbx
14 movq %rsi, %rdi
15 subq $8, %rsp
16 call __GI___strdup
17 testq %rax, %rax
18 je .L5
19 movl 4(%rbx), %edx
20 cmpl (%rbx), %edx
21 movq %rax, %rbp
22 je .L8
23 .L3:
24 movslq %edx, %rax
25 addl $1, %edx
26 salq $5, %rax
27 addq 8(%rbx), %rax
28 movl $3, (%rax)
29 movq %rbp, 8(%rax)
30 xorl %eax, %eax
31 movl %edx, 4(%rbx)
32 .L1:
33 addq $8, %rsp
34 popq %rbx
35 popq %rbp
36 ret
37 .p2align 4,,10
38 .p2align 3
39 .L8:
40 movq %rbx, %rdi
41 call __posix_spawn_file_actions_realloc
42 testl %eax, %eax
43 jne .L4
44 movl 4(%rbx), %edx
45 jmp .L3
46 .p2align 4,,10
47 .p2align 3
48 .L5:
49 addq $8, %rsp
50 movl $12, %eax
51 popq %rbx
52 popq %rbp
53 ret
54 .p2align 4,,10
55 .p2align 3
56 .L4:
57 movq %rbp, %rdi
58 call free@PLT
59 movl $12, %eax
60 jmp .L1
61 .size posix_spawn_file_actions_addchdir_np, .-posix_spawn_file_actions_addchdir_np
62 .hidden __posix_spawn_file_actions_realloc