clarify the purpose of this project
[nyanglibc.git] / nptl / thrd_join.s
blob3b4a8c1ed3c2352604d9bf8e89796d635649fb9f
1 .text
2 .p2align 4,,15
3 .globl thrd_join
4 .type thrd_join, @function
5 thrd_join:
6 pushq %rbx
7 movq %rsi, %rbx
8 subq $16, %rsp
9 leaq 8(%rsp), %rsi
10 call __pthread_join@PLT
11 testq %rbx, %rbx
12 je .L2
13 movq 8(%rsp), %rdx
14 movl %edx, (%rbx)
15 .L2:
16 cmpl $12, %eax
17 je .L4
18 jle .L17
19 cmpl $16, %eax
20 je .L7
21 cmpl $110, %eax
22 jne .L3
23 movl $4, %eax
24 .L1:
25 addq $16, %rsp
26 popq %rbx
27 ret
28 .p2align 4,,10
29 .p2align 3
30 .L7:
31 addq $16, %rsp
32 movl $1, %eax
33 popq %rbx
34 ret
35 .p2align 4,,10
36 .p2align 3
37 .L17:
38 testl %eax, %eax
39 je .L1
40 .L3:
41 addq $16, %rsp
42 movl $2, %eax
43 popq %rbx
44 ret
45 .p2align 4,,10
46 .p2align 3
47 .L4:
48 addq $16, %rsp
49 movl $3, %eax
50 popq %rbx
51 ret
52 .size thrd_join, .-thrd_join