clarify the purpose of this project
[nyanglibc.git] / stdio-common / psiginfo.shared.s
blobdff573ec2347cf72c590bf508cf48869048f168c
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 .section .rodata.str1.1,"aMS",@progbits,1
7 .LC0:
8 .string ""
9 .LC1:
10 .string ": "
11 .LC2:
12 .string "Signal sent by kill()"
13 .section .rodata.str1.8,"aMS",@progbits,1
14 .align 8
15 .LC3:
16 .string "Signal generated by the completion of an asynchronous name lookup request"
17 .align 8
18 .LC4:
19 .string "Signal generated by the completion of an I/O request"
20 .section .rodata.str1.1
21 .LC5:
22 .string "Signal sent by the kernel"
23 .LC6:
24 .string "Signal sent by sigqueue()"
25 .section .rodata.str1.8
26 .align 8
27 .LC7:
28 .string "Signal generated by the expiration of a timer"
29 .align 8
30 .LC8:
31 .string "Signal generated by the completion of an asynchronous I/O request"
32 .align 8
33 .LC9:
34 .string "Signal generated by the arrival of a message on an empty message queue"
35 .section .rodata.str1.1
36 .LC10:
37 .string "Signal sent by tkill()"
38 .LC11:
39 .string "w"
40 .LC12:
41 .string "%s%ssignal %d\n"
42 .LC13:
43 .string "%s: "
44 .LC14:
45 .string "SIGRTMIN ("
46 .LC15:
47 .string "SIGRTMIN+%d ("
48 .LC16:
49 .string "SIGRTMAX ("
50 .LC17:
51 .string "SIGRTMAX-%d ("
52 .LC18:
53 .string "%s "
54 .LC19:
55 .string "%d "
56 .LC20:
57 .string "[%p])\n"
58 .LC21:
59 .string "%ld %d %ld)\n"
60 .LC22:
61 .string "%ld)\n"
62 .LC23:
63 .string "%ld %ld)\n"
64 .LC24:
65 .string "Unknown signal %d\n"
66 .LC25:
67 .string "%s ("
68 #NO_APP
69 .text
70 .p2align 4,,15
71 .globl psiginfo
72 .type psiginfo, @function
73 psiginfo:
74 pushq %r14
75 pushq %r13
76 leaq .LC11(%rip), %rdx
77 pushq %r12
78 pushq %rbp
79 movq %rsi, %r13
80 pushq %rbx
81 movq %rdi, %rbp
82 movl $512, %esi
83 subq $512, %rsp
84 movq %rsp, %r12
85 movq %r12, %rdi
86 call __GI___fmemopen
87 testq %rax, %rax
88 je .L58
89 testq %r13, %r13
90 movq %rax, %rbx
91 je .L5
92 cmpb $0, 0(%r13)
93 jne .L59
94 .L5:
95 movl 0(%rbp), %r13d
96 cmpl $64, %r13d
97 ja .L6
98 .L62:
99 leaq __GI___sys_siglist(%rip), %rdx
100 movslq %r13d, %rax
101 movq (%rdx,%rax,8), %rsi
102 testq %rsi, %rsi
103 je .L60
104 leaq __GI__libc_intl_domainname(%rip), %rdi
105 movl $5, %edx
106 call __GI___dcgettext
107 leaq .LC25(%rip), %rsi
108 movq %rax, %rdx
109 movq %rbx, %rdi
110 xorl %eax, %eax
111 call __GI_fprintf
112 .L11:
113 movl 0(%rbp), %eax
114 movl 8(%rbp), %edx
115 subl $4, %eax
116 cmpl $25, %eax
117 ja .L16
118 leaq .L33(%rip), %rcx
119 movslq (%rcx,%rax,4), %rax
120 addq %rcx, %rax
121 jmp *%rax
122 .section .rodata
123 .align 4
124 .align 4
125 .L33:
126 .long .L32-.L33
127 .long .L45-.L33
128 .long .L16-.L33
129 .long .L34-.L33
130 .long .L35-.L33
131 .long .L16-.L33
132 .long .L16-.L33
133 .long .L36-.L33
134 .long .L16-.L33
135 .long .L16-.L33
136 .long .L16-.L33
137 .long .L16-.L33
138 .long .L16-.L33
139 .long .L13-.L33
140 .long .L16-.L33
141 .long .L16-.L33
142 .long .L16-.L33
143 .long .L16-.L33
144 .long .L16-.L33
145 .long .L16-.L33
146 .long .L16-.L33
147 .long .L16-.L33
148 .long .L16-.L33
149 .long .L16-.L33
150 .long .L16-.L33
151 .long .L15-.L33
152 .text
153 .p2align 4,,10
154 .p2align 3
155 .L60:
156 call __GI___libc_current_sigrtmin
157 cmpl %eax, %r13d
158 movl 0(%rbp), %r13d
159 jge .L8
160 .p2align 4,,10
161 .p2align 3
162 .L6:
163 leaq .LC24(%rip), %rsi
164 leaq __GI__libc_intl_domainname(%rip), %rdi
165 movl $5, %edx
166 call __GI___dcgettext
167 movl %r13d, %edx
168 movq %rax, %rsi
169 movq %rbx, %rdi
170 xorl %eax, %eax
171 call __GI_fprintf
172 .L26:
173 movq %rbx, %rdi
174 call _IO_new_fclose@PLT
175 movq %r12, %rdx
176 .L28:
177 movl (%rdx), %ecx
178 addq $4, %rdx
179 leal -16843009(%rcx), %eax
180 notl %ecx
181 andl %ecx, %eax
182 andl $-2139062144, %eax
183 je .L28
184 movl %eax, %ecx
185 movq %r12, %rsi
186 movl $2, %edi
187 shrl $16, %ecx
188 testl $32896, %eax
189 cmove %ecx, %eax
190 leaq 2(%rdx), %rcx
191 movl %eax, %ebx
192 cmove %rcx, %rdx
193 addb %al, %bl
194 sbbq $3, %rdx
195 subq %r12, %rdx
196 call __GI___write_nocancel
197 addq $512, %rsp
198 popq %rbx
199 popq %rbp
200 popq %r12
201 popq %r13
202 popq %r14
204 .p2align 4,,10
205 .p2align 3
206 .L16:
207 cmpl $-3, %edx
208 je .L46
209 jle .L61
210 cmpl $-1, %edx
211 je .L40
212 jl .L41
213 testl %edx, %edx
214 je .L42
215 cmpl $128, %edx
216 leaq .LC5(%rip), %rsi
217 jne .L18
218 .p2align 4,,10
219 .p2align 3
220 .L17:
221 leaq __GI__libc_intl_domainname(%rip), %rdi
222 movl $5, %edx
223 call __GI___dcgettext
224 leaq .LC18(%rip), %rsi
225 movq %rax, %rdx
226 movq %rbx, %rdi
227 xorl %eax, %eax
228 call __GI_fprintf
229 movl 0(%rbp), %eax
230 cmpl $11, %eax
231 ja .L24
232 .L64:
233 movl $2448, %edx
234 btq %rax, %rdx
235 jnc .L25
236 movq 16(%rbp), %rdx
237 leaq .LC20(%rip), %rsi
238 movq %rbx, %rdi
239 xorl %eax, %eax
240 call __GI_fprintf
241 jmp .L26
242 .p2align 4,,10
243 .p2align 3
244 .L58:
245 testq %r13, %r13
246 je .L43
247 cmpb $0, 0(%r13)
248 leaq .LC1(%rip), %rcx
249 je .L43
250 .L3:
251 movl 0(%rbp), %r8d
252 leaq .LC12(%rip), %rsi
253 movq %r13, %rdx
254 xorl %edi, %edi
255 xorl %eax, %eax
256 call __fxprintf
257 addq $512, %rsp
258 popq %rbx
259 popq %rbp
260 popq %r12
261 popq %r13
262 popq %r14
264 .p2align 4,,10
265 .p2align 3
266 .L59:
267 leaq .LC13(%rip), %rsi
268 movq %r13, %rdx
269 movq %rax, %rdi
270 xorl %eax, %eax
271 call __GI_fprintf
272 movl 0(%rbp), %r13d
273 cmpl $64, %r13d
274 jbe .L62
275 jmp .L6
276 .p2align 4,,10
277 .p2align 3
278 .L61:
279 cmpl $-6, %edx
280 je .L19
281 jle .L63
282 cmpl $-5, %edx
283 je .L21
284 cmpl $-4, %edx
285 leaq .LC8(%rip), %rsi
286 je .L17
287 jmp .L18
288 .p2align 4,,10
289 .p2align 3
290 .L43:
291 leaq .LC0(%rip), %rcx
292 movq %rcx, %r13
293 jmp .L3
294 .p2align 4,,10
295 .p2align 3
296 .L45:
297 leaq codes_5(%rip), %rdi
298 leaq codestrs_5(%rip), %rsi
299 movl $2, %eax
300 .p2align 4,,10
301 .p2align 3
302 .L14:
303 testl %edx, %edx
304 jle .L16
305 movslq %edx, %rcx
306 cmpq %rax, %rcx
307 ja .L16
308 movzbl -1(%rdi,%rcx), %eax
309 addq %rax, %rsi
310 jne .L17
311 .L18:
312 leaq .LC19(%rip), %rsi
313 xorl %eax, %eax
314 movq %rbx, %rdi
315 call __GI_fprintf
316 movl 0(%rbp), %eax
317 cmpl $11, %eax
318 jbe .L64
319 .L24:
320 cmpl $17, %eax
321 je .L65
322 .L25:
323 cmpl $29, %eax
324 je .L66
325 movl 20(%rbp), %ecx
326 movslq 16(%rbp), %rdx
327 leaq .LC23(%rip), %rsi
328 movq %rbx, %rdi
329 xorl %eax, %eax
330 call __GI_fprintf
331 jmp .L26
332 .p2align 4,,10
333 .p2align 3
334 .L34:
335 movl $3, %eax
336 leaq codes_7(%rip), %rdi
337 leaq codestrs_7(%rip), %rsi
338 jmp .L14
339 .p2align 4,,10
340 .p2align 3
341 .L15:
342 movl $6, %eax
343 leaq codes_29(%rip), %rdi
344 leaq codestrs_29(%rip), %rsi
345 jmp .L14
346 .p2align 4,,10
347 .p2align 3
348 .L13:
349 movl $6, %eax
350 leaq codes_17(%rip), %rdi
351 leaq codestrs_17(%rip), %rsi
352 jmp .L14
353 .p2align 4,,10
354 .p2align 3
355 .L36:
356 movl $2, %eax
357 leaq codes_11(%rip), %rdi
358 leaq codestrs_11(%rip), %rsi
359 jmp .L14
360 .p2align 4,,10
361 .p2align 3
362 .L35:
363 movl $8, %eax
364 leaq codes_8(%rip), %rdi
365 leaq codestrs_8(%rip), %rsi
366 jmp .L14
367 .p2align 4,,10
368 .p2align 3
369 .L32:
370 movl $8, %eax
371 leaq codes_4(%rip), %rdi
372 leaq codestrs_4(%rip), %rsi
373 jmp .L14
374 .p2align 4,,10
375 .p2align 3
376 .L8:
377 call __GI___libc_current_sigrtmax
378 cmpl %eax, %r13d
379 movl 0(%rbp), %r13d
380 jge .L6
381 call __GI___libc_current_sigrtmin
382 subl %eax, %r13d
383 call __GI___libc_current_sigrtmax
384 movl 0(%rbp), %r14d
385 subl %r14d, %eax
386 cmpl %eax, %r13d
387 jge .L67
388 call __GI___libc_current_sigrtmin
389 cmpl %eax, %r14d
390 je .L68
391 movl 0(%rbp), %r13d
392 call __GI___libc_current_sigrtmin
393 leaq .LC15(%rip), %rsi
394 movq %rbx, %rdi
395 movl %r13d, %edx
396 subl %eax, %edx
397 xorl %eax, %eax
398 call __GI_fprintf
399 jmp .L11
400 .p2align 4,,10
401 .p2align 3
402 .L21:
403 leaq .LC4(%rip), %rsi
404 jmp .L17
405 .p2align 4,,10
406 .p2align 3
407 .L42:
408 leaq .LC2(%rip), %rsi
409 jmp .L17
410 .p2align 4,,10
411 .p2align 3
412 .L67:
413 call __GI___libc_current_sigrtmax
414 cmpl %eax, %r14d
415 je .L69
416 call __GI___libc_current_sigrtmax
417 subl 0(%rbp), %eax
418 leaq .LC17(%rip), %rsi
419 movq %rbx, %rdi
420 movl %eax, %edx
421 xorl %eax, %eax
422 call __GI_fprintf
423 jmp .L11
424 .p2align 4,,10
425 .p2align 3
426 .L66:
427 movq 16(%rbp), %rdx
428 leaq .LC22(%rip), %rsi
429 movq %rbx, %rdi
430 xorl %eax, %eax
431 call __GI_fprintf
432 jmp .L26
433 .p2align 4,,10
434 .p2align 3
435 .L19:
436 leaq .LC10(%rip), %rsi
437 jmp .L17
438 .p2align 4,,10
439 .p2align 3
440 .L63:
441 cmpl $-60, %edx
442 leaq .LC3(%rip), %rsi
443 je .L17
444 jmp .L18
445 .p2align 4,,10
446 .p2align 3
447 .L46:
448 leaq .LC9(%rip), %rsi
449 jmp .L17
450 .p2align 4,,10
451 .p2align 3
452 .L41:
453 leaq .LC7(%rip), %rsi
454 jmp .L17
455 .p2align 4,,10
456 .p2align 3
457 .L40:
458 leaq .LC6(%rip), %rsi
459 jmp .L17
460 .p2align 4,,10
461 .p2align 3
462 .L65:
463 movslq 16(%rbp), %rdx
464 movl 20(%rbp), %r8d
465 leaq .LC21(%rip), %rsi
466 movl 24(%rbp), %ecx
467 movq %rbx, %rdi
468 xorl %eax, %eax
469 call __GI_fprintf
470 jmp .L26
471 .p2align 4,,10
472 .p2align 3
473 .L68:
474 leaq .LC14(%rip), %rdi
475 movq %rbx, %rcx
476 movl $10, %edx
477 movl $1, %esi
478 call __GI_fwrite@PLT
479 jmp .L11
480 .p2align 4,,10
481 .p2align 3
482 .L69:
483 leaq .LC16(%rip), %rdi
484 movq %rbx, %rcx
485 movl $10, %edx
486 movl $1, %esi
487 call __GI_fwrite@PLT
488 jmp .L11
489 .size psiginfo, .-psiginfo
490 .section .rodata
491 .type codes_29, @object
492 .size codes_29, 6
493 codes_29:
494 .byte 0
495 .byte 21
496 .byte 46
497 .byte 70
498 .byte 80
499 .byte 110
500 .align 32
501 .type codestrs_29, @object
502 .size codestrs_29, 130
503 codestrs_29:
504 .string "Data input available"
505 .string "Output buffers available"
506 .string "Input message available"
507 .string "I/O error"
508 .string "High priority input available"
509 .string "Device disconnected"
510 .type codes_17, @object
511 .size codes_17, 6
512 codes_17:
513 .byte 0
514 .byte 17
515 .byte 80
516 .byte -120
517 .byte -95
518 .byte -77
519 .align 32
520 .type codestrs_17, @object
521 .size codestrs_17, 207
522 codestrs_17:
523 .string "Child has exited"
524 .string "Child has terminated abnormally and did not create a core file"
525 .string "Child has terminated abnormally and created a core file"
526 .string "Traced child has trapped"
527 .string "Child has stopped"
528 .string "Stopped child has continued"
529 .type codes_5, @object
530 .size codes_5, 2
531 codes_5:
532 .byte 0
533 .byte 19
534 .align 32
535 .type codestrs_5, @object
536 .size codestrs_5, 38
537 codestrs_5:
538 .string "Process breakpoint"
539 .string "Process trace trap"
540 .type codes_7, @object
541 .size codes_7, 3
542 codes_7:
543 .byte 0
544 .byte 26
545 .byte 55
546 .align 32
547 .type codestrs_7, @object
548 .size codestrs_7, 86
549 codestrs_7:
550 .string "Invalid address alignment"
551 .string "Nonexisting physical address"
552 .string "Object-specific hardware error"
553 .type codes_11, @object
554 .size codes_11, 2
555 codes_11:
556 .byte 0
557 .byte 29
558 .align 32
559 .type codestrs_11, @object
560 .size codestrs_11, 67
561 codestrs_11:
562 .string "Address not mapped to object"
563 .string "Invalid permissions for mapped object"
564 .section .rodata.cst8,"aM",@progbits,8
565 .align 8
566 .type codes_8, @object
567 .size codes_8, 8
568 codes_8:
569 .byte 0
570 .byte 23
571 .byte 40
572 .byte 70
573 .byte 94
574 .byte 119
575 .byte -107
576 .byte -74
577 .section .rodata
578 .align 32
579 .type codestrs_8, @object
580 .size codestrs_8, 205
581 codestrs_8:
582 .string "Integer divide by zero"
583 .string "Integer overflow"
584 .string "Floating-point divide by zero"
585 .string "Floating-point overflow"
586 .string "Floating-point underflow"
587 .string "Floating-poing inexact result"
588 .string "Invalid floating-point operation"
589 .string "Subscript out of range"
590 .section .rodata.cst8
591 .align 8
592 .type codes_4, @object
593 .size codes_4, 8
594 codes_4:
595 .byte 0
596 .byte 15
597 .byte 31
598 .byte 55
599 .byte 68
600 .byte 86
601 .byte 106
602 .byte 124
603 .section .rodata
604 .align 32
605 .type codestrs_4, @object
606 .size codestrs_4, 145
607 codestrs_4:
608 .string "Illegal opcode"
609 .string "Illegal operand"
610 .string "Illegal addressing mode"
611 .string "Illegal trap"
612 .string "Privileged opcode"
613 .string "Privileged register"
614 .string "Coprocessor error"
615 .string "Internal stack error"
616 .hidden __fxprintf