clarify the purpose of this project
[nyanglibc.git] / nptl / pthread_barrier_destroy.s
blob532fe21690efedf863bea25bd588601ae4cd5b00
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_barrier_destroy
9 .type pthread_barrier_destroy, @function
10 pthread_barrier_destroy:
11 movl $2147483647, %ecx
12 xorl %edx, %edx
13 movl %ecx, %eax
14 divl 8(%rdi)
15 subl %edx, %ecx
16 movl (%rdi), %edx
17 subl %edx, %ecx
18 lock xaddl %ecx, 16(%rdi)
19 cmpl %ecx, %edx
20 jbe .L11
21 testl %edx, %edx
22 je .L11
23 pushq %rbx
24 movq %rdi, %r8
25 movl $202, %r9d
26 movl $1, %ebx
27 jmp .L5
28 .p2align 4,,10
29 .p2align 3
30 .L3:
31 movl (%r8), %edx
32 testl %edx, %edx
33 je .L15
34 .L5:
35 movl 12(%r8), %esi
36 xorl %r10d, %r10d
37 movq %r8, %rdi
38 movl %r9d, %eax
39 xorb $-128, %sil
40 #APP
41 # 146 "../sysdeps/nptl/futex-internal.h" 1
42 syscall
44 # 0 "" 2
45 #NO_APP
46 cmpq $-4096, %rax
47 jbe .L3
48 leal 11(%rax), %ecx
49 cmpl $11, %ecx
50 ja .L4
51 movq %rbx, %rax
52 salq %cl, %rax
53 testl $2177, %eax
54 jne .L3
55 .L4:
56 leaq .LC0(%rip), %rdi
57 call __libc_fatal@PLT
58 .p2align 4,,10
59 .p2align 3
60 .L15:
61 xorl %eax, %eax
62 popq %rbx
63 ret
64 .p2align 4,,10
65 .p2align 3
66 .L11:
67 xorl %eax, %eax
68 ret
69 .size pthread_barrier_destroy, .-pthread_barrier_destroy