clarify the purpose of this project
[nyanglibc.git] / nptl / mtx_init.shared.s
blob3c33fcaa94197ba845478ad5d8b017c861c1eec7
1 .text
2 .p2align 4,,15
3 .globl mtx_init
4 .type mtx_init, @function
5 mtx_init:
6 pushq %r12
7 pushq %rbp
8 movq %rdi, %r12
9 pushq %rbx
10 movl %esi, %ebp
11 subq $16, %rsp
12 leaq 12(%rsp), %rbx
13 movq %rbx, %rdi
14 call __GI___pthread_mutexattr_init
15 cmpl $1, %ebp
16 je .L3
17 cmpl $3, %ebp
18 je .L3
19 xorl %esi, %esi
20 movq %rbx, %rdi
21 call __GI___pthread_mutexattr_settype
22 movq %rbx, %rsi
23 movq %r12, %rdi
24 call __GI___pthread_mutex_init
25 cmpl $12, %eax
26 je .L6
27 .L24:
28 jle .L23
29 cmpl $16, %eax
30 je .L9
31 cmpl $110, %eax
32 jne .L5
33 movl $4, %eax
34 .L1:
35 addq $16, %rsp
36 popq %rbx
37 popq %rbp
38 popq %r12
39 ret
40 .p2align 4,,10
41 .p2align 3
42 .L3:
43 movl $1, %esi
44 movq %rbx, %rdi
45 call __GI___pthread_mutexattr_settype
46 movq %rbx, %rsi
47 movq %r12, %rdi
48 call __GI___pthread_mutex_init
49 cmpl $12, %eax
50 jne .L24
51 .L6:
52 addq $16, %rsp
53 movl $3, %eax
54 popq %rbx
55 popq %rbp
56 popq %r12
57 ret
58 .p2align 4,,10
59 .p2align 3
60 .L9:
61 addq $16, %rsp
62 movl $1, %eax
63 popq %rbx
64 popq %rbp
65 popq %r12
66 ret
67 .p2align 4,,10
68 .p2align 3
69 .L23:
70 testl %eax, %eax
71 je .L1
72 .L5:
73 addq $16, %rsp
74 movl $2, %eax
75 popq %rbx
76 popq %rbp
77 popq %r12
78 ret
79 .size mtx_init, .-mtx_init