clarify the purpose of this project
[nyanglibc.git] / nptl / pthread_mutex_init.shared.s
blob67e7e22f2d449fa89f55896e3954af898385f667
1 .text
2 .section .rodata.str1.8,"aMS",@progbits,1
3 .align 8
4 .LC0:
5 .string "The futex facility returned an unexpected error code.\n"
6 .text
7 .p2align 4,,15
8 .globl __GI___pthread_mutex_init
9 .hidden __GI___pthread_mutex_init
10 .type __GI___pthread_mutex_init, @function
11 __GI___pthread_mutex_init:
12 pushq %r13
13 pushq %r12
14 pushq %rbp
15 pushq %rbx
16 movq %rdi, %rbp
17 subq $24, %rsp
18 testq %rsi, %rsi
19 je .L2
20 movl (%rsi), %eax
21 movq %rsi, %r12
22 movl %eax, %edx
23 andl $805306368, %edx
24 je .L4
25 cmpl $268435456, %edx
26 jne .L31
27 movl tpi_supported.8778(%rip), %eax
28 testl %eax, %eax
29 je .L36
30 .L6:
31 movl tpi_supported.8778(%rip), %eax
32 testl %eax, %eax
33 js .L11
34 .L4:
35 pxor %xmm0, %xmm0
36 movq $0, 32(%rbp)
37 movups %xmm0, 0(%rbp)
38 movups %xmm0, 16(%rbp)
39 movl (%r12), %eax
40 movl %eax, %ebx
41 andl $251662335, %ebx
42 testl $1073741824, %eax
43 je .L33
44 orl $16, %ebx
45 .L33:
46 movl %eax, %edx
47 andl $805306368, %edx
48 cmpl $268435456, %edx
49 je .L17
50 cmpl $536870912, %edx
51 jne .L16
52 movl %eax, %r13d
53 orl $64, %ebx
54 sarl $12, %r13d
55 andl $4095, %r13d
56 je .L19
57 .L34:
58 sall $19, %r13d
59 .L20:
60 movl %r13d, 0(%rbp)
61 jmp .L16
62 .p2align 4,,10
63 .p2align 3
64 .L31:
65 testl $1073741824, %eax
66 je .L4
67 .L11:
68 addq $24, %rsp
69 movl $95, %eax
70 popq %rbx
71 popq %rbp
72 popq %r12
73 popq %r13
74 ret
75 .p2align 4,,10
76 .p2align 3
77 .L17:
78 orl $32, %ebx
79 .L16:
80 movl %ebx, %edx
81 orb $-128, %dl
82 testl $-1073741824, %eax
83 cmovne %edx, %ebx
84 .L22:
85 movl %ebx, 16(%rbp)
86 addq $24, %rsp
87 xorl %eax, %eax
88 popq %rbx
89 popq %rbp
90 popq %r12
91 popq %r13
92 ret
93 .p2align 4,,10
94 .p2align 3
95 .L2:
96 pxor %xmm0, %xmm0
97 movq $0, 32(%rdi)
98 xorl %ebx, %ebx
99 movups %xmm0, (%rdi)
100 movups %xmm0, 16(%rdi)
101 jmp .L22
102 .p2align 4,,10
103 .p2align 3
104 .L19:
105 movl __sched_fifo_min_prio(%rip), %edx
106 cmpl $-1, %edx
107 je .L37
108 .L21:
109 movl __sched_fifo_min_prio(%rip), %edx
110 testl %edx, %edx
111 jle .L20
112 movl __sched_fifo_min_prio(%rip), %r13d
113 jmp .L34
114 .p2align 4,,10
115 .p2align 3
116 .L36:
117 movl $0, 12(%rsp)
118 leaq 12(%rsp), %rdi
119 xorl %r10d, %r10d
120 xorl %edx, %edx
121 movl $135, %esi
122 movl $202, %eax
123 #APP
124 # 307 "../sysdeps/nptl/futex-internal.h" 1
125 syscall
127 # 0 "" 2
128 #NO_APP
129 cmpq $-4096, %rax
130 movl $1, %edx
131 ja .L38
132 .L7:
133 movl %edx, tpi_supported.8778(%rip)
134 jmp .L6
135 .p2align 4,,10
136 .p2align 3
137 .L37:
138 call __init_sched_fifo_prio
139 movl (%r12), %eax
140 jmp .L21
141 .L38:
142 cmpl $-11, %eax
143 je .L9
144 jg .L10
145 cmpl $-38, %eax
146 je .L25
147 cmpl $-35, %eax
148 je .L9
149 cmpl $-110, %eax
150 je .L9
151 .L8:
152 leaq .LC0(%rip), %rdi
153 call __libc_fatal@PLT
154 .p2align 4,,10
155 .p2align 3
156 .L10:
157 cmpl $-4, %eax
158 jl .L8
159 cmpl $-3, %eax
160 jle .L9
161 cmpl $-1, %eax
162 jne .L8
163 .L9:
164 cmpl $-38, %eax
165 movl $1, %edx
166 jne .L7
167 .L25:
168 movl $-1, %edx
169 jmp .L7
170 .size __GI___pthread_mutex_init, .-__GI___pthread_mutex_init
171 .weak pthread_mutex_init
172 .set pthread_mutex_init,__GI___pthread_mutex_init
173 .globl __pthread_mutex_init
174 .set __pthread_mutex_init,__GI___pthread_mutex_init
175 .local tpi_supported.8778
176 .comm tpi_supported.8778,4,4
177 .hidden __init_sched_fifo_prio
178 .hidden __sched_fifo_min_prio