clarify the purpose of this project
[nyanglibc.git] / nptl / futex-internal.s
blob1d5a0900d545cdc118e3bcb43bd86cb5f7930f29
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 .type __futex_abstimed_wait_common64.part.0, @function
9 __futex_abstimed_wait_common64.part.0:
10 pushq %rbp
11 pushq %rbx
12 movl %esi, %ebp
13 movl %r8d, %esi
14 movq %rcx, %r10
15 subq $40, %rsp
16 cmpl $1, %edx
17 sbbl %eax, %eax
18 andl $256, %eax
19 addl $137, %eax
20 xorl %eax, %esi
21 testb %r9b, %r9b
22 je .L3
23 #APP
24 # 74 "../sysdeps/nptl/futex-internal.c" 1
25 movl %fs:24,%eax
26 # 0 "" 2
27 #NO_APP
28 testl %eax, %eax
29 jne .L4
30 .L3:
31 movl $-1, %r9d
32 xorl %r8d, %r8d
33 movl %ebp, %edx
34 movl $202, %eax
35 #APP
36 # 78 "../sysdeps/nptl/futex-internal.c" 1
37 syscall
39 # 0 "" 2
40 #NO_APP
41 .L6:
42 cmpl $-22, %eax
43 je .L8
44 jle .L32
45 cmpl $-4, %eax
46 je .L8
47 testl %eax, %eax
48 je .L8
49 cmpl $-11, %eax
50 je .L8
51 .L7:
52 leaq .LC0(%rip), %rdi
53 call __libc_fatal@PLT
54 .p2align 4,,10
55 .p2align 3
56 .L32:
57 cmpl $-110, %eax
58 je .L8
59 cmpl $-75, %eax
60 jne .L7
61 .L8:
62 addq $40, %rsp
63 negl %eax
64 popq %rbx
65 popq %rbp
66 ret
67 .p2align 4,,10
68 .p2align 3
69 .L4:
70 movq %rdi, 16(%rsp)
71 movl %esi, 8(%rsp)
72 movq %rcx, 24(%rsp)
73 call __pthread_enable_asynccancel@PLT
74 movl $-1, %r9d
75 movl %eax, %ebx
76 xorl %r8d, %r8d
77 movq 24(%rsp), %r10
78 movl %ebp, %edx
79 movl 8(%rsp), %esi
80 movq 16(%rsp), %rdi
81 movl $202, %eax
82 #APP
83 # 74 "../sysdeps/nptl/futex-internal.c" 1
84 syscall
86 # 0 "" 2
87 #NO_APP
88 movl %ebx, %edi
89 movq %rax, 8(%rsp)
90 call __pthread_disable_asynccancel@PLT
91 movq 8(%rsp), %rax
92 jmp .L6
93 .size __futex_abstimed_wait_common64.part.0, .-__futex_abstimed_wait_common64.part.0
94 .p2align 4,,15
95 .globl __futex_abstimed_wait64
96 .type __futex_abstimed_wait64, @function
97 __futex_abstimed_wait64:
98 testq %rcx, %rcx
99 jne .L41
100 .L34:
101 cmpl $1, %edx
102 movl $22, %eax
103 jbe .L42
104 rep ret
105 .p2align 4,,10
106 .p2align 3
107 .L42:
108 xorl %r9d, %r9d
109 jmp __futex_abstimed_wait_common64.part.0
110 .p2align 4,,10
111 .p2align 3
112 .L41:
113 cmpq $0, (%rcx)
114 jns .L34
115 movl $110, %eax
117 .size __futex_abstimed_wait64, .-__futex_abstimed_wait64
118 .p2align 4,,15
119 .globl __futex_abstimed_wait_cancelable64
120 .type __futex_abstimed_wait_cancelable64, @function
121 __futex_abstimed_wait_cancelable64:
122 testq %rcx, %rcx
123 jne .L51
124 .L44:
125 cmpl $1, %edx
126 movl $22, %eax
127 jbe .L52
128 rep ret
129 .p2align 4,,10
130 .p2align 3
131 .L52:
132 movl $1, %r9d
133 jmp __futex_abstimed_wait_common64.part.0
134 .p2align 4,,10
135 .p2align 3
136 .L51:
137 cmpq $0, (%rcx)
138 jns .L44
139 movl $110, %eax
141 .size __futex_abstimed_wait_cancelable64, .-__futex_abstimed_wait_cancelable64