clarify the purpose of this project
[nyanglibc.git] / nptl / pthread_attr_copy.shared.s
blobf87eb55a69eb43489fe4fcaee6fc65704abbed47
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 __GI___pthread_attr_copy
9 .hidden __GI___pthread_attr_copy
10 .type __GI___pthread_attr_copy, @function
11 __GI___pthread_attr_copy:
12 pushq %r13
13 pushq %r12
14 pushq %rbp
15 pushq %rbx
16 movq %rdi, %rbp
17 subq $72, %rsp
18 movq 48(%rsi), %rax
19 movdqu (%rsi), %xmm0
20 movq %rax, 48(%rsp)
21 movq 40(%rsi), %rax
22 movaps %xmm0, (%rsp)
23 testq %rax, %rax
24 movdqu 16(%rsi), %xmm0
25 movaps %xmm0, 16(%rsp)
26 movdqu 32(%rsi), %xmm0
27 movaps %xmm0, 32(%rsp)
28 movq $0, 40(%rsp)
29 je .L2
30 movq %rsi, %rbx
31 movq 8(%rax), %rsi
32 testq %rsi, %rsi
33 jne .L3
34 cmpb $0, 144(%rax)
35 movq %rsp, %r13
36 jne .L4
37 .L2:
38 movdqa (%rsp), %xmm0
39 xorl %r12d, %r12d
40 movq 48(%rsp), %rax
41 movups %xmm0, 0(%rbp)
42 movdqa 16(%rsp), %xmm0
43 movq %rax, 48(%rbp)
44 movl %r12d, %eax
45 movups %xmm0, 16(%rbp)
46 movdqa 32(%rsp), %xmm0
47 movups %xmm0, 32(%rbp)
48 addq $72, %rsp
49 popq %rbx
50 popq %rbp
51 popq %r12
52 popq %r13
53 ret
54 .p2align 4,,10
55 .p2align 3
56 .L3:
57 movq (%rax), %rdx
58 movq %rsp, %r13
59 movq %r13, %rdi
60 call __GI___pthread_attr_setaffinity_np
61 testl %eax, %eax
62 movl %eax, %r12d
63 jne .L5
64 movq 40(%rbx), %rax
65 cmpb $0, 144(%rax)
66 je .L2
67 .p2align 4,,10
68 .p2align 3
69 .L4:
70 leaq 16(%rax), %rsi
71 movq %r13, %rdi
72 call __GI___pthread_attr_setsigmask_internal
73 testl %eax, %eax
74 movl %eax, %r12d
75 je .L2
76 .L5:
77 movq %r13, %rdi
78 call __GI___pthread_attr_destroy
79 addq $72, %rsp
80 movl %r12d, %eax
81 popq %rbx
82 popq %rbp
83 popq %r12
84 popq %r13
85 ret
86 .size __GI___pthread_attr_copy, .-__GI___pthread_attr_copy
87 .globl __pthread_attr_copy
88 .set __pthread_attr_copy,__GI___pthread_attr_copy