clarify the purpose of this project
[nyanglibc.git] / nptl / sem_post.s
blob1a370a4c3cffcc829f73c9545659f12ef999510d
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 __new_sem_post
9 .type __new_sem_post, @function
10 __new_sem_post:
11 movl 8(%rdi), %esi
12 movq (%rdi), %rax
13 .L4:
14 cmpl $2147483647, %eax
15 je .L17
16 leaq 1(%rax), %rdx
17 lock cmpxchgq %rdx, (%rdi)
18 jne .L4
19 shrq $32, %rax
20 testq %rax, %rax
21 je .L7
22 xorb $-127, %sil
23 xorl %r10d, %r10d
24 movl $1, %edx
25 movl $202, %eax
26 #APP
27 # 209 "../sysdeps/nptl/futex-internal.h" 1
28 syscall
30 # 0 "" 2
31 #NO_APP
32 cmpq $-4096, %rax
33 ja .L18
34 .L7:
35 xorl %eax, %eax
36 ret
37 .p2align 4,,10
38 .p2align 3
39 .L18:
40 cmpl $-22, %eax
41 je .L7
42 cmpl $-14, %eax
43 je .L7
44 leaq .LC0(%rip), %rdi
45 subq $8, %rsp
46 call __libc_fatal@PLT
47 .p2align 4,,10
48 .p2align 3
49 .L17:
50 movq errno@gottpoff(%rip), %rax
51 movl $75, %fs:(%rax)
52 movl $-1, %eax
53 ret
54 .size __new_sem_post, .-__new_sem_post
55 .weak sem_post
56 .set sem_post,__new_sem_post