clarify the purpose of this project
[nyanglibc.git] / nptl / libc-cancellation.shared.s
blob07be91f28f00ab622e734ae394bcb73582c3b0cb
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 #NO_APP
7 .p2align 4,,15
8 .globl __libc_enable_asynccancel
9 .hidden __libc_enable_asynccancel
10 .type __libc_enable_asynccancel, @function
11 __libc_enable_asynccancel:
12 movq %fs:16, %rsi
13 #APP
14 # 35 "../nptl/cancellation.c" 1
15 movl %fs:776,%edx
16 # 0 "" 2
17 #NO_APP
18 .L3:
19 movl %edx, %ecx
20 orl $2, %ecx
21 cmpl %ecx, %edx
22 je .L1
23 movl %edx, %eax
24 lock cmpxchgl %ecx, 776(%rsi)
25 cmpl %eax, %edx
26 jne .L5
27 andl $-69, %ecx
28 cmpl $10, %ecx
29 je .L10
30 .L1:
31 movl %edx, %eax
32 ret
33 .p2align 4,,10
34 .p2align 3
35 .L5:
36 movl %eax, %edx
37 jmp .L3
38 .L10:
39 subq $8, %rsp
40 #APP
41 # 50 "../nptl/cancellation.c" 1
42 movq $-1,%fs:1584
43 # 0 "" 2
44 #NO_APP
45 movq %fs:16, %rax
46 #APP
47 # 304 "pthreadP.h" 1
48 lock;orl $16, 776(%rax)
49 # 0 "" 2
50 # 307 "pthreadP.h" 1
51 movq %fs:768,%rdi
52 # 0 "" 2
53 #NO_APP
54 call __pthread_unwind@PLT
55 .size __libc_enable_asynccancel, .-__libc_enable_asynccancel
56 .section .rodata.str1.8,"aMS",@progbits,1
57 .align 8
58 .LC0:
59 .string "The futex facility returned an unexpected error code.\n"
60 .text
61 .p2align 4,,15
62 .globl __libc_disable_asynccancel
63 .hidden __libc_disable_asynccancel
64 .type __libc_disable_asynccancel, @function
65 __libc_disable_asynccancel:
66 andl $2, %edi
67 jne .L21
68 #APP
69 # 78 "../nptl/cancellation.c" 1
70 movl %fs:776,%ecx
71 # 0 "" 2
72 #NO_APP
73 movq %fs:16, %rax
74 leaq 776(%rax), %r8
75 .L13:
76 movl %ecx, %edx
77 movl %ecx, %eax
78 andl $-3, %edx
79 lock cmpxchgl %edx, (%r8)
80 cmpl %eax, %ecx
81 jne .L17
82 andl $12, %ecx
83 cmpl $4, %ecx
84 je .L24
85 .L21:
86 rep ret
87 .p2align 4,,10
88 .p2align 3
89 .L24:
90 pushq %rbx
91 movl $202, %r9d
92 movl $1, %ebx
93 .L16:
94 xorl %r10d, %r10d
95 movl $128, %esi
96 movq %r8, %rdi
97 movl %r9d, %eax
98 #APP
99 # 146 "../sysdeps/nptl/futex-internal.h" 1
100 syscall
102 # 0 "" 2
103 #NO_APP
104 cmpq $-4096, %rax
105 ja .L25
106 .L14:
107 #APP
108 # 102 "../nptl/cancellation.c" 1
109 movl %fs:776,%edx
110 # 0 "" 2
111 #NO_APP
112 movl %edx, %eax
113 andl $12, %eax
114 cmpl $4, %eax
115 je .L16
116 popq %rbx
118 .p2align 4,,10
119 .p2align 3
120 .L17:
121 movl %eax, %ecx
122 jmp .L13
123 .L25:
124 leal 11(%rax), %ecx
125 cmpl $11, %ecx
126 ja .L15
127 movq %rbx, %rax
128 salq %cl, %rax
129 testl $2177, %eax
130 jne .L14
131 .L15:
132 leaq .LC0(%rip), %rdi
133 call __GI___libc_fatal
134 .size __libc_disable_asynccancel, .-__libc_disable_asynccancel