Some broken software wants to deal with ld.so.cache.
[nyanglibc.git] / nptl / cleanup_defer.shared.s
blob40bcacdec3ee4a7a004e5a05426998b258237842
1 .text
2 .p2align 4,,15
3 .globl __pthread_register_cancel_defer
4 .type __pthread_register_cancel_defer, @function
5 __pthread_register_cancel_defer:
6 movq %fs:16, %rcx
7 #APP
8 # 31 "cleanup_defer.c" 1
9 movq %fs:768,%rax
10 # 0 "" 2
11 #NO_APP
12 movq %rax, 72(%rdi)
13 #APP
14 # 32 "cleanup_defer.c" 1
15 movq %fs:760,%rax
16 # 0 "" 2
17 #NO_APP
18 movq %rax, 80(%rdi)
19 #APP
20 # 34 "cleanup_defer.c" 1
21 movl %fs:776,%edx
22 # 0 "" 2
23 #NO_APP
24 addq $776, %rcx
25 testb $2, %dl
26 jne .L3
27 .L2:
28 sarl %edx
29 andl $1, %edx
30 movl %edx, 88(%rdi)
31 #APP
32 # 57 "cleanup_defer.c" 1
33 movq %rdi,%fs:768
34 # 0 "" 2
35 #NO_APP
36 ret
37 .p2align 4,,10
38 .p2align 3
39 .L4:
40 movl %eax, %edx
41 .p2align 4,,10
42 .p2align 3
43 .L3:
44 movl %edx, %esi
45 movl %edx, %eax
46 andl $-3, %esi
47 lock cmpxchgl %esi, (%rcx)
48 cmpl %eax, %edx
49 je .L2
50 jmp .L4
51 .size __pthread_register_cancel_defer, .-__pthread_register_cancel_defer
52 .p2align 4,,15
53 .globl __pthread_unregister_cancel_restore
54 .type __pthread_unregister_cancel_restore, @function
55 __pthread_unregister_cancel_restore:
56 movq 72(%rdi), %rax
57 #APP
58 # 68 "cleanup_defer.c" 1
59 movq %rax,%fs:768
60 # 0 "" 2
61 #NO_APP
62 movl 88(%rdi), %eax
63 testl %eax, %eax
64 je .L9
65 #APP
66 # 72 "cleanup_defer.c" 1
67 movl %fs:776,%edx
68 # 0 "" 2
69 #NO_APP
70 testb $2, %dl
71 jne .L9
72 movq %fs:16, %rax
73 leaq 776(%rax), %rcx
74 .L11:
75 movl %edx, %esi
76 movl %edx, %eax
77 orl $2, %esi
78 lock cmpxchgl %esi, (%rcx)
79 cmpl %eax, %edx
80 jne .L12
81 #APP
82 # 89 "cleanup_defer.c" 1
83 movl %fs:776,%eax
84 # 0 "" 2
85 #NO_APP
86 andl $-71, %eax
87 cmpl $8, %eax
88 je .L16
89 .L9:
90 rep ret
91 .L16:
92 subq $8, %rsp
93 #APP
94 # 89 "cleanup_defer.c" 1
95 movq $-1,%fs:1584
96 # 0 "" 2
97 #NO_APP
98 movq %fs:16, %rax
99 #APP
100 # 304 "pthreadP.h" 1
101 lock;orl $16, 776(%rax)
102 # 0 "" 2
103 # 307 "pthreadP.h" 1
104 movq %fs:768,%rdi
105 # 0 "" 2
106 #NO_APP
107 call __GI___pthread_unwind
108 .p2align 4,,10
109 .p2align 3
110 .L12:
111 movl %eax, %edx
112 jmp .L11
113 .size __pthread_unregister_cancel_restore, .-__pthread_unregister_cancel_restore