clarify the purpose of this project
[nyanglibc.git] / posix / spawn_valid_fd.shared.s
blob1626e08c913f27d375cfe5a88b32401e450adaaa
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 __spawn_valid_fd
9 .hidden __spawn_valid_fd
10 .type __spawn_valid_fd, @function
11 __spawn_valid_fd:
12 pushq %rbx
13 movslq %edi, %rbx
14 movl $4, %edi
15 call __GI___sysconf
16 testl %ebx, %ebx
17 js .L3
18 cmpq %rbx, %rax
19 seta %al
20 popq %rbx
21 ret
22 .p2align 4,,10
23 .p2align 3
24 .L3:
25 xorl %eax, %eax
26 popq %rbx
27 ret
28 .size __spawn_valid_fd, .-__spawn_valid_fd