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