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