clarify the purpose of this project
[nyanglibc.git] / nptl / pthread_setcancelstate.s
blob347cdb24ecf7bb512bb7052afd4a825708d5748e
1 .text
2 .p2align 4,,15
3 .globl __pthread_setcancelstate
4 .type __pthread_setcancelstate, @function
5 __pthread_setcancelstate:
6 cmpl $1, %edi
7 ja .L9
8 subq $24, %rsp
9 movq %fs:16, %r8
10 #APP
11 # 34 "pthread_setcancelstate.c" 1
12 movl %fs:776,%eax
13 # 0 "" 2
14 #NO_APP
15 movl %eax, 12(%rsp)
16 movl 12(%rsp), %ecx
17 .L7:
18 movl %ecx, %eax
19 movl %ecx, %edx
20 orl $1, %eax
21 andl $-2, %edx
22 cmpl $1, %edi
23 cmove %eax, %edx
24 testq %rsi, %rsi
25 je .L5
26 movl %ecx, %eax
27 andl $1, %eax
28 movl %eax, (%rsi)
29 .L5:
30 cmpl %edx, %ecx
31 je .L8
32 movl %ecx, %eax
33 lock cmpxchgl %edx, 776(%r8)
34 cmpl %eax, %ecx
35 jne .L10
36 andl $-69, %edx
37 cmpl $10, %edx
38 je .L19
39 .L8:
40 xorl %eax, %eax
41 addq $24, %rsp
42 ret
43 .p2align 4,,10
44 .p2align 3
45 .L9:
46 movl $22, %eax
47 ret
48 .p2align 4,,10
49 .p2align 3
50 .L10:
51 movl %eax, %ecx
52 jmp .L7
53 .L19:
54 movq %fs:16, %rax
55 #APP
56 # 304 "pthreadP.h" 1
57 lock;orl $16, 776(%rax)
58 # 0 "" 2
59 # 307 "pthreadP.h" 1
60 movq %fs:768,%rdi
61 # 0 "" 2
62 #NO_APP
63 call __pthread_unwind@PLT
64 .size __pthread_setcancelstate, .-__pthread_setcancelstate
65 .globl pthread_setcancelstate
66 .set pthread_setcancelstate,__pthread_setcancelstate