clarify the purpose of this project
[nyanglibc.git] / posix / pause.shared.s
blob2803e9ab49a99bc4e43b0c89af8dc04035077686
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 #NO_APP
7 .p2align 4,,15
8 .globl __libc_pause
9 .type __libc_pause, @function
10 __libc_pause:
11 #APP
12 # 29 "../sysdeps/unix/sysv/linux/pause.c" 1
13 movl %fs:24,%eax
14 # 0 "" 2
15 #NO_APP
16 testl %eax, %eax
17 jne .L2
18 movl $34, %eax
19 #APP
20 # 29 "../sysdeps/unix/sysv/linux/pause.c" 1
21 syscall
23 # 0 "" 2
24 #NO_APP
25 cmpq $-4096, %rax
26 ja .L11
27 rep ret
28 .p2align 4,,10
29 .p2align 3
30 .L2:
31 subq $24, %rsp
32 call __libc_enable_asynccancel
33 movl %eax, %edi
34 movl $34, %eax
35 #APP
36 # 29 "../sysdeps/unix/sysv/linux/pause.c" 1
37 syscall
39 # 0 "" 2
40 #NO_APP
41 cmpq $-4096, %rax
42 ja .L12
43 .L6:
44 movl %eax, 12(%rsp)
45 call __libc_disable_asynccancel
46 movl 12(%rsp), %eax
47 addq $24, %rsp
48 ret
49 .p2align 4,,10
50 .p2align 3
51 .L11:
52 movq __libc_errno@gottpoff(%rip), %rdx
53 negl %eax
54 movl %eax, %fs:(%rdx)
55 movl $-1, %eax
56 ret
57 .L12:
58 movq __libc_errno@gottpoff(%rip), %rdx
59 negl %eax
60 movl %eax, %fs:(%rdx)
61 movl $-1, %eax
62 jmp .L6
63 .size __libc_pause, .-__libc_pause
64 .weak pause
65 .set pause,__libc_pause
66 .hidden __libc_disable_asynccancel
67 .hidden __libc_enable_asynccancel