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