clarify the purpose of this project
[nyanglibc.git] / stdio-common / psignal.s
blob70167b1ccafe8fd30eac72f1574231500ef3a5d8
1 .text
2 .section .rodata.str1.1,"aMS",@progbits,1
3 .LC0:
4 .string ""
5 .LC1:
6 .string ": "
7 .LC2:
8 .string "%s%s%s\n"
9 .LC3:
10 .string "%s%sUnknown signal %d\n"
11 .LC4:
12 .string "Unknown signal"
13 .LC5:
14 .string "%s"
15 .text
16 .p2align 4,,15
17 .globl psignal
18 .type psignal, @function
19 psignal:
20 .LFB67:
21 .cfi_startproc
22 pushq %r12
23 .cfi_def_cfa_offset 16
24 .cfi_offset 12, -16
25 pushq %rbp
26 .cfi_def_cfa_offset 24
27 .cfi_offset 6, -24
28 movl %edi, %ebp
29 pushq %rbx
30 .cfi_def_cfa_offset 32
31 .cfi_offset 3, -32
32 subq $16, %rsp
33 .cfi_def_cfa_offset 48
34 testq %rsi, %rsi
35 je .L8
36 cmpb $0, (%rsi)
37 movq %rsi, %rbx
38 leaq .LC1(%rip), %r12
39 je .L8
40 .L2:
41 cmpl $64, %ebp
42 ja .L3
43 leaq __sys_siglist(%rip), %rdx
44 movslq %ebp, %rax
45 movq (%rdx,%rax,8), %rsi
46 movl $5, %edx
47 testq %rsi, %rsi
48 jne .L13
49 .L3:
50 leaq .LC3(%rip), %rsi
51 leaq _libc_intl_domainname(%rip), %rdi
52 movl $5, %edx
53 call __dcgettext
54 leaq 8(%rsp), %rdi
55 movq %rax, %rsi
56 movl %ebp, %r8d
57 xorl %eax, %eax
58 movq %r12, %rcx
59 movq %rbx, %rdx
60 call __asprintf
61 testl %eax, %eax
62 js .L15
63 movq 8(%rsp), %rdx
64 leaq .LC5(%rip), %rsi
65 xorl %edi, %edi
66 xorl %eax, %eax
67 call __fxprintf
68 movq 8(%rsp), %rdi
69 call free@PLT
70 addq $16, %rsp
71 .cfi_remember_state
72 .cfi_def_cfa_offset 32
73 popq %rbx
74 .cfi_def_cfa_offset 24
75 popq %rbp
76 .cfi_def_cfa_offset 16
77 popq %r12
78 .cfi_def_cfa_offset 8
79 ret
80 .p2align 4,,10
81 .p2align 3
82 .L8:
83 .cfi_restore_state
84 leaq .LC0(%rip), %r12
85 movq %r12, %rbx
86 jmp .L2
87 .p2align 4,,10
88 .p2align 3
89 .L15:
90 leaq .LC4(%rip), %rsi
91 movl $5, %edx
92 .L13:
93 leaq _libc_intl_domainname(%rip), %rdi
94 call __dcgettext
95 leaq .LC2(%rip), %rsi
96 movq %rax, %r8
97 movq %r12, %rcx
98 movq %rbx, %rdx
99 xorl %edi, %edi
100 xorl %eax, %eax
101 call __fxprintf
102 addq $16, %rsp
103 .cfi_def_cfa_offset 32
104 popq %rbx
105 .cfi_def_cfa_offset 24
106 popq %rbp
107 .cfi_def_cfa_offset 16
108 popq %r12
109 .cfi_def_cfa_offset 8
111 .cfi_endproc
112 .LFE67:
113 .size psignal, .-psignal
114 .hidden __fxprintf
115 .hidden __asprintf
116 .hidden __dcgettext
117 .hidden _libc_intl_domainname
118 .hidden __sys_siglist