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