clarify the purpose of this project
[nyanglibc.git] / sunrpc / pmap_clnt.shared.s
blobb766b8eb736dcf101b7280da9165913cc1f521d2
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 .symver __EI_pmap_set, pmap_set@GLIBC_2.2.5
7 .symver __EI_pmap_unset, pmap_unset@GLIBC_2.2.5
8 .section .rodata.str1.1,"aMS",@progbits,1
9 .LC0:
10 .string "get_myaddress: getifaddrs"
11 #NO_APP
12 .text
13 .p2align 4,,15
14 .type __get_myaddress, @function
15 __get_myaddress:
16 pushq %rbx
17 movq %rdi, %rbx
18 subq $16, %rsp
19 leaq 8(%rsp), %rdi
20 call __GI_getifaddrs
21 testl %eax, %eax
22 jne .L23
23 .L2:
24 movq 8(%rsp), %rdi
25 testq %rdi, %rdi
26 je .L8
27 movl $1, %esi
28 .L7:
29 movl %esi, %r8d
30 movq %rdi, %rax
31 xorl $1, %r8d
32 .p2align 4,,10
33 .p2align 3
34 .L6:
35 movl 16(%rax), %edx
36 testb $1, %dl
37 je .L4
38 movq 24(%rax), %rcx
39 testq %rcx, %rcx
40 je .L4
41 cmpw $2, (%rcx)
42 je .L24
43 .L4:
44 movq (%rax), %rax
45 testq %rax, %rax
46 jne .L6
47 cmpl $1, %esi
48 jne .L8
49 xorl %esi, %esi
50 jmp .L7
51 .p2align 4,,10
52 .p2align 3
53 .L24:
54 andl $8, %edx
55 jne .L10
56 testb %r8b, %r8b
57 je .L4
58 .L10:
59 movdqu (%rcx), %xmm0
60 movl $28416, %eax
61 movaps %xmm0, (%rbx)
62 movw %ax, 2(%rbx)
63 movl $1, %ebx
64 call __GI_freeifaddrs
65 addq $16, %rsp
66 movl %ebx, %eax
67 popq %rbx
68 ret
69 .p2align 4,,10
70 .p2align 3
71 .L8:
72 .L3:
73 call __GI_freeifaddrs
74 xorl %ebx, %ebx
75 addq $16, %rsp
76 movl %ebx, %eax
77 popq %rbx
78 ret
79 .L23:
80 leaq .LC0(%rip), %rdi
81 call __GI_perror
82 movl $1, %edi
83 call __GI_exit
84 .size __get_myaddress, .-__get_myaddress
85 .section .rodata.str1.1
86 .LC1:
87 .string "Cannot register service"
88 .text
89 .p2align 4,,15
90 .globl __GI_pmap_set
91 .hidden __GI_pmap_set
92 .type __GI_pmap_set, @function
93 __GI_pmap_set:
94 pushq %r14
95 pushq %r13
96 movq %rdi, %r14
97 pushq %r12
98 pushq %rbp
99 movq %rsi, %r13
100 pushq %rbx
101 movslq %edx, %r12
102 movzwl %cx, %ebx
103 subq $64, %rsp
104 leaq 16(%rsp), %rbp
105 movl $-1, 8(%rsp)
106 movq %rbp, %rdi
107 call __get_myaddress
108 testl %eax, %eax
109 jne .L26
110 .L28:
111 addq $64, %rsp
112 xorl %eax, %eax
113 popq %rbx
114 popq %rbp
115 popq %r12
116 popq %r13
117 popq %r14
119 .p2align 4,,10
120 .p2align 3
121 .L26:
122 pushq $400
123 pushq $400
124 movq %rbp, %rdi
125 movq timeout(%rip), %rcx
126 movq 8+timeout(%rip), %r8
127 movl $100000, %esi
128 leaq 24(%rsp), %r9
129 movl $2, %edx
130 call __GI_clntudp_bufcreate
131 testq %rax, %rax
132 movq %rax, %rbp
133 popq %rsi
134 popq %rdi
135 je .L28
136 movq 8(%rax), %rax
137 movq %r14, 32(%rsp)
138 leaq 32(%rsp), %rcx
139 movq %r13, 40(%rsp)
140 movq %r12, 48(%rsp)
141 leaq __GI_xdr_pmap(%rip), %rdx
142 movq %rbx, 56(%rsp)
143 pushq 8+tottimeout(%rip)
144 leaq __GI_xdr_bool(%rip), %r8
145 pushq tottimeout(%rip)
146 movl $1, %esi
147 movq %rbp, %rdi
148 leaq 28(%rsp), %r9
149 call *(%rax)
150 testl %eax, %eax
151 popq %rdx
152 popq %rcx
153 jne .L37
154 .L29:
155 movq 8(%rbp), %rax
156 movq %rbp, %rdi
157 call *32(%rax)
158 movl 12(%rsp), %eax
159 addq $64, %rsp
160 popq %rbx
161 popq %rbp
162 popq %r12
163 popq %r13
164 popq %r14
166 .p2align 4,,10
167 .p2align 3
168 .L37:
169 leaq .LC1(%rip), %rsi
170 leaq __GI__libc_intl_domainname(%rip), %rdi
171 movl $5, %edx
172 call __GI___dcgettext
173 movq %rbp, %rdi
174 movq %rax, %rsi
175 call __GI_clnt_perror
176 movl $0, 12(%rsp)
177 jmp .L29
178 .size __GI_pmap_set, .-__GI_pmap_set
179 .globl __EI_pmap_set
180 .set __EI_pmap_set,__GI_pmap_set
181 .p2align 4,,15
182 .globl __GI_pmap_unset
183 .hidden __GI_pmap_unset
184 .type __GI_pmap_unset, @function
185 __GI_pmap_unset:
186 pushq %r12
187 pushq %rbp
188 movq %rdi, %r12
189 pushq %rbx
190 movq %rsi, %rbp
191 subq $64, %rsp
192 leaq 16(%rsp), %rbx
193 movl $-1, 8(%rsp)
194 movq %rbx, %rdi
195 call __get_myaddress
196 testl %eax, %eax
197 jne .L39
198 .L41:
199 addq $64, %rsp
200 xorl %eax, %eax
201 popq %rbx
202 popq %rbp
203 popq %r12
205 .p2align 4,,10
206 .p2align 3
207 .L39:
208 pushq $400
209 pushq $400
210 movq %rbx, %rdi
211 movq timeout(%rip), %rcx
212 movq 8+timeout(%rip), %r8
213 movl $100000, %esi
214 leaq 24(%rsp), %r9
215 movl $2, %edx
216 call __GI_clntudp_bufcreate
217 testq %rax, %rax
218 movq %rax, %rbx
219 popq %rsi
220 popq %rdi
221 je .L41
222 movq 8(%rax), %rax
223 movq %r12, 32(%rsp)
224 leaq 32(%rsp), %rcx
225 movq %rbp, 40(%rsp)
226 movq $0, 48(%rsp)
227 leaq __GI_xdr_pmap(%rip), %rdx
228 movq $0, 56(%rsp)
229 pushq 8+tottimeout(%rip)
230 movq %rbx, %rdi
231 pushq tottimeout(%rip)
232 leaq __GI_xdr_bool(%rip), %r8
233 movl $2, %esi
234 leaq 28(%rsp), %r9
235 call *(%rax)
236 movq 8(%rbx), %rax
237 movq %rbx, %rdi
238 call *32(%rax)
239 movl 28(%rsp), %eax
240 popq %rdx
241 popq %rcx
242 addq $64, %rsp
243 popq %rbx
244 popq %rbp
245 popq %r12
247 .size __GI_pmap_unset, .-__GI_pmap_unset
248 .globl __EI_pmap_unset
249 .set __EI_pmap_unset,__GI_pmap_unset
250 .section .rodata.cst16,"aM",@progbits,16
251 .align 16
252 .type tottimeout, @object
253 .size tottimeout, 16
254 tottimeout:
255 .quad 60
256 .quad 0
257 .align 16
258 .type timeout, @object
259 .size timeout, 16
260 timeout:
261 .quad 5
262 .quad 0