clarify the purpose of this project
[nyanglibc.git] / nptl / pthread_attr_getaffinity.s
blob1441ca3a3402de06c15c7863b2751c78de6aeca5
1 .text
2 .p2align 4,,15
3 .globl __pthread_attr_getaffinity_new
4 .type __pthread_attr_getaffinity_new, @function
5 __pthread_attr_getaffinity_new:
6 pushq %rbp
7 pushq %rbx
8 movq %rdi, %rbp
9 movq %rsi, %rbx
10 movq %rdx, %rdi
11 subq $8, %rsp
12 movq 40(%rbp), %rax
13 testq %rax, %rax
14 je .L2
15 movq (%rax), %rsi
16 testq %rsi, %rsi
17 je .L2
18 movq 8(%rax), %rdx
19 cmpq %rdx, %rbx
20 jnb .L3
21 cmpb $0, (%rsi,%rbx)
22 jne .L8
23 leaq 1(%rsi,%rbx), %rax
24 leaq (%rsi,%rdx), %rcx
25 jmp .L5
26 .p2align 4,,10
27 .p2align 3
28 .L6:
29 addq $1, %rax
30 cmpb $0, -1(%rax)
31 jne .L8
32 .L5:
33 cmpq %rcx, %rax
34 jne .L6
35 .L3:
36 cmpq %rdx, %rbx
37 cmovbe %rbx, %rdx
38 call __mempcpy@PLT
39 movq 40(%rbp), %rdx
40 xorl %ebp, %ebp
41 movq 8(%rdx), %rdx
42 cmpq %rbx, %rdx
43 jb .L18
44 .L1:
45 addq $8, %rsp
46 movl %ebp, %eax
47 popq %rbx
48 popq %rbp
49 ret
50 .p2align 4,,10
51 .p2align 3
52 .L8:
53 movl $22, %ebp
54 addq $8, %rsp
55 movl %ebp, %eax
56 popq %rbx
57 popq %rbp
58 ret
59 .p2align 4,,10
60 .p2align 3
61 .L2:
62 movq %rbx, %rdx
63 movl $-1, %esi
64 xorl %ebp, %ebp
65 call memset@PLT
66 addq $8, %rsp
67 movl %ebp, %eax
68 popq %rbx
69 popq %rbp
70 ret
71 .p2align 4,,10
72 .p2align 3
73 .L18:
74 subq %rdx, %rbx
75 xorl %esi, %esi
76 movq %rax, %rdi
77 movq %rbx, %rdx
78 call memset@PLT
79 jmp .L1
80 .size __pthread_attr_getaffinity_new, .-__pthread_attr_getaffinity_new
81 .weak pthread_attr_getaffinity_np
82 .set pthread_attr_getaffinity_np,__pthread_attr_getaffinity_new