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