clarify the purpose of this project
[nyanglibc.git] / signal / sigsuspend.s
blob957d3b158e34bb9e6999e77d044ad9e40c6ea893
1 .text
2 .p2align 4,,15
3 .globl __sigsuspend
4 .hidden __sigsuspend
5 .type __sigsuspend, @function
6 __sigsuspend:
7 #APP
8 # 26 "../sysdeps/unix/sysv/linux/sigsuspend.c" 1
9 movl %fs:24,%eax
10 # 0 "" 2
11 #NO_APP
12 testl %eax, %eax
13 jne .L2
14 movl $8, %esi
15 movl $130, %eax
16 #APP
17 # 26 "../sysdeps/unix/sysv/linux/sigsuspend.c" 1
18 syscall
20 # 0 "" 2
21 #NO_APP
22 cmpq $-4096, %rax
23 ja .L11
24 rep ret
25 .p2align 4,,10
26 .p2align 3
27 .L2:
28 pushq %rbx
29 movq %rdi, %rbx
30 subq $16, %rsp
31 call __libc_enable_asynccancel
32 movl $8, %esi
33 movl %eax, %edx
34 movq %rbx, %rdi
35 movl $130, %eax
36 #APP
37 # 26 "../sysdeps/unix/sysv/linux/sigsuspend.c" 1
38 syscall
40 # 0 "" 2
41 #NO_APP
42 cmpq $-4096, %rax
43 ja .L12
44 .L6:
45 movl %edx, %edi
46 movl %eax, 12(%rsp)
47 call __libc_disable_asynccancel
48 movl 12(%rsp), %eax
49 addq $16, %rsp
50 popq %rbx
51 ret
52 .p2align 4,,10
53 .p2align 3
54 .L11:
55 movq __libc_errno@gottpoff(%rip), %rdx
56 negl %eax
57 movl %eax, %fs:(%rdx)
58 movl $-1, %eax
59 ret
60 .L12:
61 movq __libc_errno@gottpoff(%rip), %rcx
62 negl %eax
63 movl %eax, %fs:(%rcx)
64 movl $-1, %eax
65 jmp .L6
66 .size __sigsuspend, .-__sigsuspend
67 .globl __libc_sigsuspend
68 .set __libc_sigsuspend,__sigsuspend
69 .weak sigsuspend
70 .set sigsuspend,__sigsuspend
71 .hidden __libc_disable_asynccancel
72 .hidden __libc_enable_asynccancel