clarify the purpose of this project
[nyanglibc.git] / misc / pselect.shared.s
blob5159137b08f41d664bdd599052c19be5c0c91186
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 __pselect
9 .type __pselect, @function
10 __pselect:
11 pushq %r15
12 pushq %r14
13 movq %rcx, %r10
14 pushq %r13
15 pushq %r12
16 pushq %rbp
17 pushq %rbx
18 xorl %ebx, %ebx
19 subq $56, %rsp
20 testq %r8, %r8
21 je .L2
22 movdqu (%r8), %xmm0
23 leaq 16(%rsp), %rbx
24 movaps %xmm0, 16(%rsp)
25 .L2:
26 movq %r9, 32(%rsp)
27 movq $8, 40(%rsp)
28 #APP
29 # 52 "../sysdeps/unix/sysv/linux/pselect.c" 1
30 movl %fs:24,%eax
31 # 0 "" 2
32 #NO_APP
33 testl %eax, %eax
34 leaq 32(%rsp), %r9
35 jne .L3
36 movq %rbx, %r8
37 movl $270, %eax
38 #APP
39 # 52 "../sysdeps/unix/sysv/linux/pselect.c" 1
40 syscall
42 # 0 "" 2
43 #NO_APP
44 cmpq $-4096, %rax
45 ja .L13
46 .L1:
47 addq $56, %rsp
48 popq %rbx
49 popq %rbp
50 popq %r12
51 popq %r13
52 popq %r14
53 popq %r15
54 ret
55 .p2align 4,,10
56 .p2align 3
57 .L3:
58 movq %r10, %r15
59 movq %rdx, %r14
60 movq %rsi, %r13
61 movl %edi, %r12d
62 movq %r9, 8(%rsp)
63 call __libc_enable_asynccancel
64 movq 8(%rsp), %r9
65 movl %eax, %ebp
66 movq %rbx, %r8
67 movq %r15, %r10
68 movq %r14, %rdx
69 movq %r13, %rsi
70 movl %r12d, %edi
71 movl $270, %eax
72 #APP
73 # 52 "../sysdeps/unix/sysv/linux/pselect.c" 1
74 syscall
76 # 0 "" 2
77 #NO_APP
78 cmpq $-4096, %rax
79 ja .L14
80 .L7:
81 movl %ebp, %edi
82 movl %eax, 8(%rsp)
83 call __libc_disable_asynccancel
84 movl 8(%rsp), %eax
85 addq $56, %rsp
86 popq %rbx
87 popq %rbp
88 popq %r12
89 popq %r13
90 popq %r14
91 popq %r15
92 ret
93 .p2align 4,,10
94 .p2align 3
95 .L13:
96 movq __libc_errno@gottpoff(%rip), %rdx
97 negl %eax
98 movl %eax, %fs:(%rdx)
99 movl $-1, %eax
100 jmp .L1
101 .L14:
102 movq __libc_errno@gottpoff(%rip), %rdx
103 negl %eax
104 movl %eax, %fs:(%rdx)
105 movl $-1, %eax
106 jmp .L7
107 .size __pselect, .-__pselect
108 .weak pselect
109 .set pselect,__pselect
110 .hidden __libc_disable_asynccancel
111 .hidden __libc_enable_asynccancel