clarify the purpose of this project
[nyanglibc.git] / nptl / lowlevellock.s
blobd12138e109217aa4daf04ebbaee45015f787adbf
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 __lll_lock_wait_private
9 .type __lll_lock_wait_private, @function
10 __lll_lock_wait_private:
11 movl (%rdi), %eax
12 movq %rdi, %r8
13 cmpl $2, %eax
14 jne .L2
15 .L3:
16 xorl %r10d, %r10d
17 movl $2, %edx
18 movl $128, %esi
19 movq %r8, %rdi
20 movl $202, %eax
21 #APP
22 # 146 "../sysdeps/nptl/futex-internal.h" 1
23 syscall
25 # 0 "" 2
26 #NO_APP
27 cmpq $-4096, %rax
28 ja .L8
29 .L2:
30 movl $2, %eax
31 xchgl (%r8), %eax
32 testl %eax, %eax
33 jne .L3
34 ret
35 .p2align 4,,10
36 .p2align 3
37 .L8:
38 leal 11(%rax), %ecx
39 cmpl $11, %ecx
40 ja .L4
41 movl $1, %eax
42 salq %cl, %rax
43 testl $2177, %eax
44 jne .L2
45 .L4:
46 leaq .LC0(%rip), %rdi
47 subq $8, %rsp
48 call __libc_fatal@PLT
49 .size __lll_lock_wait_private, .-__lll_lock_wait_private
50 .p2align 4,,15
51 .globl __lll_lock_wait
52 .type __lll_lock_wait, @function
53 __lll_lock_wait:
54 movl (%rdi), %eax
55 movq %rdi, %r8
56 movl %esi, %r9d
57 cmpl $2, %eax
58 jne .L10
59 .L11:
60 movl %r9d, %esi
61 xorl %r10d, %r10d
62 movl $2, %edx
63 xorb $-128, %sil
64 movq %r8, %rdi
65 movl $202, %eax
66 #APP
67 # 146 "../sysdeps/nptl/futex-internal.h" 1
68 syscall
70 # 0 "" 2
71 #NO_APP
72 cmpq $-4096, %rax
73 ja .L15
74 .L10:
75 movl $2, %eax
76 xchgl (%r8), %eax
77 testl %eax, %eax
78 jne .L11
79 ret
80 .p2align 4,,10
81 .p2align 3
82 .L15:
83 leal 11(%rax), %ecx
84 cmpl $11, %ecx
85 ja .L12
86 movl $1, %eax
87 salq %cl, %rax
88 testl $2177, %eax
89 jne .L10
90 .L12:
91 leaq .LC0(%rip), %rdi
92 subq $8, %rsp
93 call __libc_fatal@PLT
94 .size __lll_lock_wait, .-__lll_lock_wait