clarify the purpose of this project
[nyanglibc.git] / sunrpc / compat-svc_run.shared.s
blob5f292891f34825232ab68f681dd3444553d4ba74
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 .symver __EI_svc_exit, svc_exit@GLIBC_2.2.5
7 #NO_APP
8 .p2align 4,,15
9 .globl __GI_svc_exit
10 .hidden __GI_svc_exit
11 .type __GI_svc_exit, @function
12 __GI_svc_exit:
13 pushq %rbx
14 call __GI___rpc_thread_svc_pollfd
15 movq (%rax), %rdi
16 movq %rax, %rbx
17 call free@PLT
18 movq $0, (%rbx)
19 call __GI___rpc_thread_svc_max_pollfd
20 movl $0, (%rax)
21 popq %rbx
22 ret
23 .size __GI_svc_exit, .-__GI_svc_exit
24 .globl __EI_svc_exit
25 .set __EI_svc_exit,__GI_svc_exit
26 .section .rodata.str1.1,"aMS",@progbits,1
27 .LC0:
28 .string "svc_run: - out of memory"
29 .LC1:
30 .string "svc_run: - poll failed"
31 .text
32 .p2align 4,,15
33 .globl __GI_svc_run
34 .hidden __GI_svc_run
35 .type __GI_svc_run, @function
36 __GI_svc_run:
37 pushq %r15
38 pushq %r14
39 xorl %r15d, %r15d
40 pushq %r13
41 pushq %r12
42 movl $-1, %r14d
43 pushq %rbp
44 pushq %rbx
45 xorl %ebp, %ebp
46 subq $8, %rsp
47 call __GI___rpc_thread_svc_max_pollfd
48 movq %rax, %r13
49 .L5:
50 movl 0(%r13), %ebx
51 testl %ebx, %ebx
52 jne .L7
53 call __GI___rpc_thread_svc_pollfd
54 cmpq $0, (%rax)
55 je .L8
56 testl %r15d, %r15d
57 je .L17
58 xorl %esi, %esi
59 movq %rbp, %rdi
60 call realloc@PLT
61 testq %rax, %rax
62 jne .L28
63 .L15:
64 leaq __GI__libc_intl_domainname(%rip), %rdi
65 leaq .LC0(%rip), %rsi
66 movl $5, %edx
67 call __GI___dcgettext
68 movq %rax, %rdi
69 call __GI_perror
70 .L8:
71 addq $8, %rsp
72 movq %rbp, %rdi
73 popq %rbx
74 popq %rbp
75 popq %r12
76 popq %r13
77 popq %r14
78 popq %r15
79 jmp free@PLT
80 .p2align 4,,10
81 .p2align 3
82 .L7:
83 cmpl %ebx, %r15d
84 movslq %ebx, %r12
85 jne .L29
86 .L10:
87 testl %ebx, %ebx
88 jle .L11
89 call __GI___rpc_thread_svc_pollfd
90 movq (%rax), %rax
91 leal -1(%rbx), %ecx
92 movq %rbp, %rdx
93 leaq 8(%rax,%rcx,8), %rsi
94 .p2align 4,,10
95 .p2align 3
96 .L12:
97 movl (%rax), %ecx
98 addq $8, %rax
99 addq $8, %rdx
100 movl %ecx, -8(%rdx)
101 movzwl -4(%rax), %ecx
102 movw %cx, -4(%rdx)
103 xorl %ecx, %ecx
104 movw %cx, -2(%rdx)
105 cmpq %rsi, %rax
106 jne .L12
107 .L11:
108 movl %r14d, %edx
109 movq %r12, %rsi
110 movq %rbp, %rdi
111 call __GI___poll
112 cmpl $-1, %eax
113 je .L14
114 testl %eax, %eax
115 je .L6
116 movl %eax, %esi
117 movq %rbp, %rdi
118 call __GI_svc_getreq_poll
119 .L6:
120 movl %ebx, %r15d
121 jmp .L5
122 .p2align 4,,10
123 .p2align 3
124 .L14:
125 movq __libc_errno@gottpoff(%rip), %rax
126 cmpl $4, %fs:(%rax)
127 je .L6
128 leaq .LC1(%rip), %rsi
129 leaq __GI__libc_intl_domainname(%rip), %rdi
130 movl $5, %edx
131 call __GI___dcgettext
132 movq %rax, %rdi
133 call __GI_perror
134 jmp .L8
135 .p2align 4,,10
136 .p2align 3
137 .L29:
138 leaq 0(,%r12,8), %rsi
139 movq %rbp, %rdi
140 call realloc@PLT
141 testq %rax, %rax
142 je .L15
143 movq %rax, %rbp
144 jmp .L10
145 .p2align 4,,10
146 .p2align 3
147 .L17:
148 xorl %r12d, %r12d
149 jmp .L11
150 .L28:
151 movq %rax, %rbp
152 xorl %r12d, %r12d
153 jmp .L11
154 .size __GI_svc_run, .-__GI_svc_run
155 .globl svc_run
156 .set svc_run,__GI_svc_run