clarify the purpose of this project
[nyanglibc.git] / nptl / sem_post.shared.s
blobce5d0cc649d73b9dade5289a67afa21946569e71
1 .text
2 #APP
3 .symver __new_sem_post,sem_post@@GLIBC_2.2.5
4 .section .rodata.str1.8,"aMS",@progbits,1
5 .align 8
6 .LC0:
7 .string "The futex facility returned an unexpected error code.\n"
8 #NO_APP
9 .text
10 .p2align 4,,15
11 .globl __new_sem_post
12 .type __new_sem_post, @function
13 __new_sem_post:
14 movl 8(%rdi), %esi
15 movq (%rdi), %rax
16 .L4:
17 cmpl $2147483647, %eax
18 je .L17
19 leaq 1(%rax), %rdx
20 lock cmpxchgq %rdx, (%rdi)
21 jne .L4
22 shrq $32, %rax
23 testq %rax, %rax
24 je .L7
25 xorb $-127, %sil
26 xorl %r10d, %r10d
27 movl $1, %edx
28 movl $202, %eax
29 #APP
30 # 209 "../sysdeps/nptl/futex-internal.h" 1
31 syscall
33 # 0 "" 2
34 #NO_APP
35 cmpq $-4096, %rax
36 ja .L18
37 .L7:
38 xorl %eax, %eax
39 ret
40 .p2align 4,,10
41 .p2align 3
42 .L18:
43 cmpl $-22, %eax
44 je .L7
45 cmpl $-14, %eax
46 je .L7
47 leaq .LC0(%rip), %rdi
48 subq $8, %rsp
49 call __libc_fatal@PLT
50 .p2align 4,,10
51 .p2align 3
52 .L17:
53 movq errno@gottpoff(%rip), %rax
54 movl $75, %fs:(%rax)
55 movl $-1, %eax
56 ret
57 .size __new_sem_post, .-__new_sem_post