clarify the purpose of this project
[nyanglibc.git] / nptl / sem_timedwait.s
blobce69e8e29da323d496493c558ea3ed6ad4c20654
1 .text
2 .p2align 4,,15
3 .type __sem_wait_cleanup, @function
4 __sem_wait_cleanup:
5 movabsq $-4294967296, %rax
6 lock addq %rax, (%rdi)
7 ret
8 .size __sem_wait_cleanup, .-__sem_wait_cleanup
9 .p2align 4,,15
10 .type do_futex_wait.constprop.2, @function
11 do_futex_wait.constprop.2:
12 movl 8(%rdi), %r8d
13 movq %rsi, %rcx
14 xorl %edx, %edx
15 xorl %esi, %esi
16 jmp __futex_abstimed_wait_cancelable64@PLT
17 .size do_futex_wait.constprop.2, .-do_futex_wait.constprop.2
18 .p2align 4,,15
19 .type __new_sem_wait_slow64.constprop.1, @function
20 __new_sem_wait_slow64.constprop.1:
21 pushq %r14
22 pushq %r13
23 movq %rsi, %r14
24 pushq %r12
25 pushq %rbp
26 movabsq $4294967296, %rbp
27 pushq %rbx
28 movq %rdi, %rbx
29 subq $32, %rsp
30 lock xaddq %rbp, (%rdi)
31 leaq __sem_wait_cleanup(%rip), %rsi
32 movabsq $-4294967297, %r13
33 movq %rsp, %r12
34 movq %rdi, %rdx
35 movq %r12, %rdi
36 call __pthread_cleanup_push@PLT
37 .L5:
38 testl %ebp, %ebp
39 je .L13
40 leaq 0(%rbp,%r13), %rdx
41 movq %rbp, %rax
42 lock cmpxchgq %rdx, (%rbx)
43 movq %rax, %rbp
44 jne .L5
45 xorl %ebx, %ebx
46 .L9:
47 movq %r12, %rdi
48 xorl %esi, %esi
49 call __pthread_cleanup_pop@PLT
50 addq $32, %rsp
51 movl %ebx, %eax
52 popq %rbx
53 popq %rbp
54 popq %r12
55 popq %r13
56 popq %r14
57 ret
58 .p2align 4,,10
59 .p2align 3
60 .L13:
61 movq %r14, %rsi
62 movq %rbx, %rdi
63 call do_futex_wait.constprop.2
64 cmpl $110, %eax
65 je .L7
66 cmpl $4, %eax
67 je .L7
68 cmpl $75, %eax
69 je .L7
70 movq (%rbx), %rbp
71 jmp .L5
72 .p2align 4,,10
73 .p2align 3
74 .L7:
75 movq errno@gottpoff(%rip), %rdx
76 movl %eax, %fs:(%rdx)
77 movabsq $-4294967296, %rax
78 lock addq %rax, (%rbx)
79 movl $-1, %ebx
80 jmp .L9
81 .size __new_sem_wait_slow64.constprop.1, .-__new_sem_wait_slow64.constprop.1
82 .p2align 4,,15
83 .globl __sem_timedwait
84 .type __sem_timedwait, @function
85 __sem_timedwait:
86 cmpq $999999999, 8(%rsi)
87 ja .L25
88 pushq %rbp
89 pushq %rbx
90 movq %rdi, %rbx
91 movq %rsi, %rbp
92 subq $8, %rsp
93 call __pthread_testcancel@PLT
94 movq (%rbx), %rax
95 testl %eax, %eax
96 je .L18
97 leaq -1(%rax), %rdx
98 lock cmpxchgq %rdx, (%rbx)
99 jne .L18
100 addq $8, %rsp
101 xorl %eax, %eax
102 popq %rbx
103 popq %rbp
105 .p2align 4,,10
106 .p2align 3
107 .L18:
108 addq $8, %rsp
109 movq %rbp, %rsi
110 movq %rbx, %rdi
111 popq %rbx
112 popq %rbp
113 jmp __new_sem_wait_slow64.constprop.1
114 .p2align 4,,10
115 .p2align 3
116 .L25:
117 movq errno@gottpoff(%rip), %rax
118 movl $22, %fs:(%rax)
119 movl $-1, %eax
121 .size __sem_timedwait, .-__sem_timedwait
122 .weak sem_timedwait
123 .set sem_timedwait,__sem_timedwait