clarify the purpose of this project
[nyanglibc.git] / signal / sigtimedwait.s
blobb7b6efad002f575ab848506c07668764f7b93818
1 .text
2 .p2align 4,,15
3 .globl __sigtimedwait
4 .hidden __sigtimedwait
5 .type __sigtimedwait, @function
6 __sigtimedwait:
7 pushq %rbp
8 pushq %rbx
9 movq %rsi, %rbx
10 subq $24, %rsp
11 #APP
12 # 28 "../sysdeps/unix/sysv/linux/sigtimedwait.c" 1
13 movl %fs:24,%eax
14 # 0 "" 2
15 #NO_APP
16 testl %eax, %eax
17 jne .L2
18 movl $128, %ecx
19 movl $8, %r10d
20 movl %ecx, %eax
21 #APP
22 # 28 "../sysdeps/unix/sysv/linux/sigtimedwait.c" 1
23 syscall
25 # 0 "" 2
26 #NO_APP
27 cmpq $-4096, %rax
28 movq %rax, %rdx
29 ja .L3
30 cmpl $-1, %eax
31 setne %bpl
32 testq %rsi, %rsi
33 setne %dl
34 andl %edx, %ebp
35 .L4:
36 testb %bpl, %bpl
37 je .L1
38 cmpl $-6, 8(%rbx)
39 je .L12
40 .L1:
41 addq $24, %rsp
42 popq %rbx
43 popq %rbp
44 ret
45 .p2align 4,,10
46 .p2align 3
47 .L12:
48 movl $0, 8(%rbx)
49 addq $24, %rsp
50 popq %rbx
51 popq %rbp
52 ret
53 .p2align 4,,10
54 .p2align 3
55 .L2:
56 movq %rdx, 8(%rsp)
57 movq %rdi, (%rsp)
58 call __libc_enable_asynccancel
59 movl $128, %ecx
60 movl %eax, %r8d
61 movl $8, %r10d
62 movq 8(%rsp), %rdx
63 movq %rbx, %rsi
64 movq (%rsp), %rdi
65 movl %ecx, %eax
66 #APP
67 # 28 "../sysdeps/unix/sysv/linux/sigtimedwait.c" 1
68 syscall
70 # 0 "" 2
71 #NO_APP
72 testq %rbx, %rbx
73 movq %rax, %rdx
74 setne %cl
75 cmpq $-4096, %rax
76 ja .L6
77 cmpl $-1, %eax
78 movl %r8d, %edi
79 movl %eax, (%rsp)
80 setne %bpl
81 andl %ecx, %ebp
82 call __libc_disable_asynccancel
83 movl (%rsp), %eax
84 jmp .L4
85 .p2align 4,,10
86 .p2align 3
87 .L3:
88 movq __libc_errno@gottpoff(%rip), %rax
89 negl %edx
90 movl %edx, %fs:(%rax)
91 movl $-1, %eax
92 jmp .L1
93 .L6:
94 movq __libc_errno@gottpoff(%rip), %rax
95 negl %edx
96 movl %r8d, %edi
97 movl %edx, %fs:(%rax)
98 call __libc_disable_asynccancel
99 movl $-1, %eax
100 jmp .L1
101 .size __sigtimedwait, .-__sigtimedwait
102 .weak sigtimedwait
103 .set sigtimedwait,__sigtimedwait
104 .hidden __libc_disable_asynccancel
105 .hidden __libc_enable_asynccancel