clarify the purpose of this project
[nyanglibc.git] / nptl / pthread_join_common.shared.s
blobe175baf7149b40e4668292ce02a33ec691ca6b39
1 .text
2 .p2align 4,,15
3 .type cleanup, @function
4 cleanup:
5 movq %rdi, -8(%rsp)
6 movq %fs:16, %rax
7 xorl %edx, %edx
8 lock cmpxchgq %rdx, -8(%rsp)
9 ret
10 .size cleanup, .-cleanup
11 .p2align 4,,15
12 .globl __pthread_clockjoin_ex
13 .hidden __pthread_clockjoin_ex
14 .type __pthread_clockjoin_ex, @function
15 __pthread_clockjoin_ex:
16 movl 720(%rdi), %eax
17 testl %eax, %eax
18 js .L17
19 cmpq %rdi, 1576(%rdi)
20 je .L8
21 movq %fs:16, %r9
22 cmpq %rdi, %r9
23 je .L6
24 cmpq %rdi, 1576(%r9)
25 je .L28
26 .L7:
27 leaq 1576(%rdi), %r10
28 xorl %r11d, %r11d
29 movq %r9, %rax
30 lock cmpxchgq %r11, (%r10)
31 je .L8
32 pushq %r15
33 pushq %r14
34 pushq %r13
35 pushq %r12
36 movq %rsi, %r13
37 pushq %rbp
38 pushq %rbx
39 movq %rcx, %r12
40 movl %edx, %ebp
41 movq %rdi, %rbx
42 subq $56, %rsp
43 testb %r8b, %r8b
44 jne .L9
45 .L27:
46 movq 1584(%rbx), %rax
47 .L10:
48 testq %r13, %r13
49 movl $-1, 720(%rbx)
50 je .L16
51 movq %rax, 0(%r13)
52 .L16:
53 movq %rbx, %rdi
54 call __free_tcb
55 xorl %eax, %eax
56 .L3:
57 addq $56, %rsp
58 popq %rbx
59 popq %rbp
60 popq %r12
61 popq %r13
62 popq %r14
63 popq %r15
64 ret
65 .p2align 4,,10
66 .p2align 3
67 .L28:
68 testb $60, 776(%rdi)
69 jne .L7
70 .L6:
71 movl 776(%r9), %r10d
72 movl $35, %eax
73 andl $-71, %r10d
74 cmpl $8, %r10d
75 je .L7
76 rep ret
77 .p2align 4,,10
78 .p2align 3
79 .L8:
80 movl $22, %eax
81 ret
82 .p2align 4,,10
83 .p2align 3
84 .L9:
85 leaq 16(%rsp), %r15
86 leaq cleanup(%rip), %rsi
87 movq %r10, %rdx
88 leaq 720(%rbx), %r14
89 movq %r15, %rdi
90 call __pthread_cleanup_push
91 jmp .L11
92 .p2align 4,,10
93 .p2align 3
94 .L13:
95 movl $128, %r8d
96 movq %r12, %rcx
97 movl %ebp, %edx
98 movq %r14, %rdi
99 call __GI___futex_abstimed_wait_cancelable64
100 cmpl $110, %eax
101 je .L12
102 cmpl $75, %eax
103 je .L12
104 .L11:
105 movl (%r14), %esi
106 testl %esi, %esi
107 jne .L13
108 xorl %esi, %esi
109 movq %r15, %rdi
110 call __pthread_cleanup_pop
111 movq 1584(%rbx), %rax
112 jmp .L10
113 .p2align 4,,10
114 .p2align 3
115 .L17:
116 movl $3, %eax
118 .p2align 4,,10
119 .p2align 3
120 .L12:
121 xorl %esi, %esi
122 movq %r15, %rdi
123 movl %eax, 12(%rsp)
124 call __pthread_cleanup_pop
125 movl 12(%rsp), %eax
126 testl %eax, %eax
127 je .L27
128 movq $0, 1576(%rbx)
129 jmp .L3
130 .size __pthread_clockjoin_ex, .-__pthread_clockjoin_ex
131 .hidden __pthread_cleanup_pop
132 .hidden __pthread_cleanup_push
133 .hidden __free_tcb