clarify the purpose of this project
[nyanglibc.git] / signal / signal.s
blobe1c29ad4c5654221d58315c3812bf965c9bc161d
1 .text
2 .p2align 4,,15
3 .type __bsd_signal.part.1, @function
4 __bsd_signal.part.1:
5 subq $328, %rsp
6 movl $1, %edx
7 movq %rsi, (%rsp)
8 leal -1(%rdi), %esi
9 movq $0, 8(%rsp)
10 movl %esi, %eax
11 sarl $31, %eax
12 shrl $26, %eax
13 leal (%rsi,%rax), %ecx
14 andl $63, %ecx
15 subl %eax, %ecx
16 leal 62(%rdi), %eax
17 salq %cl, %rdx
18 testl %esi, %esi
19 leaq _sigintr(%rip), %rcx
20 cmovns %esi, %eax
21 movq %rsp, %rsi
22 sarl $6, %eax
23 cltq
24 orq %rdx, 8(%rsp,%rax,8)
25 testq %rdx, (%rcx,%rax,8)
26 leaq 160(%rsp), %rdx
27 sete %al
28 movzbl %al, %eax
29 sall $28, %eax
30 movl %eax, 136(%rsp)
31 call __sigaction
32 testl %eax, %eax
33 movq $-1, %rdx
34 js .L1
35 movq 160(%rsp), %rdx
36 .L1:
37 movq %rdx, %rax
38 addq $328, %rsp
39 ret
40 .size __bsd_signal.part.1, .-__bsd_signal.part.1
41 .p2align 4,,15
42 .globl __bsd_signal
43 .type __bsd_signal, @function
44 __bsd_signal:
45 leal -1(%rdi), %eax
46 cmpl $63, %eax
47 ja .L10
48 cmpq $-1, %rsi
49 jne .L14
50 .L10:
51 movq __libc_errno@gottpoff(%rip), %rax
52 movl $22, %fs:(%rax)
53 movq $-1, %rax
54 ret
55 .p2align 4,,10
56 .p2align 3
57 .L14:
58 leal -32(%rdi), %eax
59 cmpl $1, %eax
60 jbe .L10
61 jmp __bsd_signal.part.1
62 .size __bsd_signal, .-__bsd_signal
63 .weak ssignal
64 .set ssignal,__bsd_signal
65 .weak signal
66 .set signal,__bsd_signal
67 .weak bsd_signal
68 .set bsd_signal,__bsd_signal
69 .hidden _sigintr
70 .comm _sigintr,128,32
71 .hidden __sigaction