clarify the purpose of this project
[nyanglibc.git] / io / poll.shared.s
blobec6084ebd4ffc5309c6426ef3b56be711d5fb0c8
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 __GI___poll
9 .hidden __GI___poll
10 .type __GI___poll, @function
11 __GI___poll:
12 #APP
13 # 29 "../sysdeps/unix/sysv/linux/poll.c" 1
14 movl %fs:24,%eax
15 # 0 "" 2
16 #NO_APP
17 testl %eax, %eax
18 jne .L2
19 movl $7, %eax
20 #APP
21 # 29 "../sysdeps/unix/sysv/linux/poll.c" 1
22 syscall
24 # 0 "" 2
25 #NO_APP
26 cmpq $-4096, %rax
27 ja .L11
28 rep ret
29 .p2align 4,,10
30 .p2align 3
31 .L2:
32 pushq %r12
33 pushq %rbp
34 movl %edx, %r12d
35 pushq %rbx
36 movq %rsi, %rbp
37 movq %rdi, %rbx
38 subq $16, %rsp
39 call __libc_enable_asynccancel
40 movl %r12d, %edx
41 movl %eax, %r8d
42 movq %rbp, %rsi
43 movq %rbx, %rdi
44 movl $7, %eax
45 #APP
46 # 29 "../sysdeps/unix/sysv/linux/poll.c" 1
47 syscall
49 # 0 "" 2
50 #NO_APP
51 cmpq $-4096, %rax
52 ja .L12
53 .L6:
54 movl %r8d, %edi
55 movl %eax, 12(%rsp)
56 call __libc_disable_asynccancel
57 movl 12(%rsp), %eax
58 addq $16, %rsp
59 popq %rbx
60 popq %rbp
61 popq %r12
62 ret
63 .p2align 4,,10
64 .p2align 3
65 .L11:
66 movq __libc_errno@gottpoff(%rip), %rdx
67 negl %eax
68 movl %eax, %fs:(%rdx)
69 movl $-1, %eax
70 ret
71 .L12:
72 movq __libc_errno@gottpoff(%rip), %rdx
73 negl %eax
74 movl %eax, %fs:(%rdx)
75 movl $-1, %eax
76 jmp .L6
77 .size __GI___poll, .-__GI___poll
78 .globl __poll
79 .set __poll,__GI___poll
80 .globl __libc_poll
81 .set __libc_poll,__poll
82 .weak poll
83 .set poll,__poll
84 .hidden __libc_disable_asynccancel
85 .hidden __libc_enable_asynccancel