clarify the purpose of this project
[nyanglibc.git] / sunrpc / svc_simple.shared.s
blobcd54a12c50981f8cd8a86f3403824391f9c0d81f
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 .symver __registerrpc,registerrpc@GLIBC_2.2.5
7 .section .rodata.str1.1,"aMS",@progbits,1
8 .LC0:
9 .string "xxx\n"
10 .LC1:
11 .string "trouble replying to prog %d\n"
12 .LC2:
13 .string "never registered prog %d\n"
14 .LC3:
15 .string "%s"
16 #NO_APP
17 .text
18 .p2align 4,,15
19 .type universal, @function
20 universal:
21 pushq %r14
22 pushq %r13
23 movq %rsi, %r13
24 pushq %r12
25 pushq %rbp
26 pushq %rbx
27 subq $8816, %rsp
28 movq 16(%rdi), %r12
29 movq $0, 8(%rsp)
30 testq %r12, %r12
31 je .L25
32 movq (%rdi), %r14
33 call __rpc_thread_variables
34 movq 248(%rax), %rbx
35 movl %r14d, %ebp
36 testq %rbx, %rbx
37 jne .L13
38 jmp .L4
39 .p2align 4,,10
40 .p2align 3
41 .L5:
42 movq 32(%rbx), %rbx
43 testq %rbx, %rbx
44 je .L4
45 .L13:
46 cmpl %ebp, 8(%rbx)
47 jne .L5
48 cmpl %r12d, 12(%rbx)
49 jne .L5
50 leaq 16(%rsp), %rbp
51 xorl %esi, %esi
52 movl $8800, %edx
53 movq %rbp, %rdi
54 call __GI_memset@PLT
55 movq 8(%r13), %rax
56 movq 16(%rbx), %rsi
57 movq %rbp, %rdx
58 movq %r13, %rdi
59 call *16(%rax)
60 testl %eax, %eax
61 je .L26
62 movq %rbp, %rdi
63 call *(%rbx)
64 testq %rax, %rax
65 je .L8
66 movq 24(%rbx), %rsi
67 .L9:
68 movq %rax, %rdx
69 movq %r13, %rdi
70 call __GI_svc_sendreply
71 testl %eax, %eax
72 je .L27
73 movq 8(%r13), %rax
74 movq 16(%rbx), %rsi
75 movq %rbp, %rdx
76 movq %r13, %rdi
77 call *32(%rax)
78 jmp .L1
79 .p2align 4,,10
80 .p2align 3
81 .L4:
82 leaq __GI__libc_intl_domainname(%rip), %rdi
83 leaq .LC2(%rip), %rsi
84 movl $5, %edx
85 call __GI___dcgettext
86 leaq 8(%rsp), %rdi
87 movl %r14d, %edx
88 .L23:
89 movq %rax, %rsi
90 xorl %eax, %eax
91 call __GI___asprintf
92 testl %eax, %eax
93 js .L28
94 movq 8(%rsp), %rdx
95 testq %rdx, %rdx
96 je .L12
97 leaq .LC3(%rip), %rsi
98 xorl %edi, %edi
99 xorl %eax, %eax
100 call __fxprintf
101 movq 8(%rsp), %rdi
102 call free@PLT
103 movl $1, %edi
104 call __GI_exit
105 .p2align 4,,10
106 .p2align 3
107 .L25:
108 leaq __GI_xdr_void(%rip), %rsi
109 xorl %edx, %edx
110 movq %r13, %rdi
111 call __GI_svc_sendreply
112 testl %eax, %eax
113 je .L29
114 .L1:
115 addq $8816, %rsp
116 popq %rbx
117 popq %rbp
118 popq %r12
119 popq %r13
120 popq %r14
122 .p2align 4,,10
123 .p2align 3
124 .L28:
125 movq $0, 8(%rsp)
126 .L12:
127 movl $1, %edi
128 call __GI_exit
129 .p2align 4,,10
130 .p2align 3
131 .L8:
132 leaq __GI_xdr_void(%rip), %rsi
133 cmpq %rsi, 24(%rbx)
134 jne .L1
135 jmp .L9
136 .L26:
137 movq %r13, %rdi
138 call __GI_svcerr_decode
139 jmp .L1
140 .L27:
141 movl 8(%rbx), %ebx
142 leaq __GI__libc_intl_domainname(%rip), %rdi
143 leaq .LC1(%rip), %rsi
144 movl $5, %edx
145 call __GI___dcgettext
146 leaq 8(%rsp), %rdi
147 movl %ebx, %edx
148 jmp .L23
149 .L29:
150 leaq .LC0(%rip), %rsi
151 movl $2, %edi
152 movl $4, %edx
153 call __GI___write
154 movl $1, %edi
155 call __GI_exit
156 .size universal, .-universal
157 .section .rodata.str1.8,"aMS",@progbits,1
158 .align 8
159 .LC4:
160 .string "can't reassign procedure number %ld\n"
161 .align 8
162 .LC5:
163 .string "couldn't create an rpc server\n"
164 .align 8
165 .LC6:
166 .string "couldn't register prog %ld vers %ld\n"
167 .section .rodata.str1.1
168 .LC7:
169 .string "registerrpc: out of memory\n"
170 .text
171 .p2align 4,,15
172 .globl __registerrpc
173 .type __registerrpc, @function
174 __registerrpc:
175 pushq %r15
176 pushq %r14
177 pushq %r13
178 pushq %r12
179 pushq %rbp
180 pushq %rbx
181 subq $40, %rsp
182 testq %rdx, %rdx
183 movq %r9, 8(%rsp)
184 je .L46
185 movq %rdi, %rbx
186 movq %rsi, %r12
187 movq %rdx, %r13
188 movq %rcx, %r15
189 movq %r8, %r14
190 call __rpc_thread_variables
191 cmpq $0, 256(%rax)
192 movq %rax, %rbp
193 je .L47
194 .L34:
195 movq %r12, %rsi
196 movq %rbx, %rdi
197 call __GI_pmap_unset
198 movq 256(%rbp), %rdi
199 leaq universal(%rip), %rcx
200 movl $17, %r8d
201 movq %r12, %rdx
202 movq %rbx, %rsi
203 call __GI_svc_register
204 testl %eax, %eax
205 jne .L36
206 leaq .LC6(%rip), %rsi
207 leaq __GI__libc_intl_domainname(%rip), %rdi
208 movl $5, %edx
209 call __GI___dcgettext
210 leaq 24(%rsp), %rdi
211 movq %rax, %rsi
212 movq %r12, %rcx
213 xorl %eax, %eax
214 movq %rbx, %rdx
215 call __GI___asprintf
216 testl %eax, %eax
217 js .L39
218 .L43:
219 movq 24(%rsp), %rdx
220 .L35:
221 testq %rdx, %rdx
222 je .L39
223 leaq .LC3(%rip), %rsi
224 xorl %edi, %edi
225 xorl %eax, %eax
226 call __fxprintf
227 movq 24(%rsp), %rdi
228 call free@PLT
229 addq $40, %rsp
230 movl $-1, %eax
231 popq %rbx
232 popq %rbp
233 popq %r12
234 popq %r13
235 popq %r14
236 popq %r15
238 .p2align 4,,10
239 .p2align 3
240 .L36:
241 movl $40, %edi
242 call malloc@PLT
243 testq %rax, %rax
244 je .L48
245 movq 248(%rbp), %rdx
246 movq 8(%rsp), %rcx
247 movq %r15, (%rax)
248 movl %ebx, 8(%rax)
249 movl %r13d, 12(%rax)
250 movq %r14, 16(%rax)
251 movq %rcx, 24(%rax)
252 movq %rdx, 32(%rax)
253 movq %rax, 248(%rbp)
254 addq $40, %rsp
255 xorl %eax, %eax
256 popq %rbx
257 popq %rbp
258 popq %r12
259 popq %r13
260 popq %r14
261 popq %r15
263 .p2align 4,,10
264 .p2align 3
265 .L47:
266 movl $-1, %edi
267 call __GI_svcudp_create
268 testq %rax, %rax
269 movq %rax, 256(%rbp)
270 movl $5, %edx
271 leaq .LC5(%rip), %rsi
272 jne .L34
273 .L45:
274 leaq __GI__libc_intl_domainname(%rip), %rdi
275 call __GI___dcgettext
276 movq %rax, %rdi
277 call __GI___strdup
278 movq %rax, %rdx
279 movq %rax, 24(%rsp)
280 jmp .L35
281 .p2align 4,,10
282 .p2align 3
283 .L46:
284 leaq .LC4(%rip), %rsi
285 leaq __GI__libc_intl_domainname(%rip), %rdi
286 movl $5, %edx
287 call __GI___dcgettext
288 leaq 24(%rsp), %rdi
289 xorl %edx, %edx
290 movq %rax, %rsi
291 xorl %eax, %eax
292 call __GI___asprintf
293 testl %eax, %eax
294 jns .L43
295 .L39:
296 addq $40, %rsp
297 movl $-1, %eax
298 popq %rbx
299 popq %rbp
300 popq %r12
301 popq %r13
302 popq %r14
303 popq %r15
305 .p2align 4,,10
306 .p2align 3
307 .L48:
308 movl $5, %edx
309 leaq .LC7(%rip), %rsi
310 jmp .L45
311 .size __registerrpc, .-__registerrpc
312 .hidden __fxprintf
313 .hidden __rpc_thread_variables