clarify the purpose of this project
[nyanglibc.git] / misc / mlock2.shared.s
blob135f5cdfa7c015bfa95f357ac6734687cac66871
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 mlock2
9 .type mlock2, @function
10 mlock2:
11 testl %edx, %edx
12 jne .L2
13 movl $149, %eax
14 #APP
15 # 29 "../sysdeps/unix/sysv/linux/mlock2.c" 1
16 syscall
18 # 0 "" 2
19 #NO_APP
20 cmpq $-4096, %rax
21 ja .L9
22 .L1:
23 rep ret
24 .p2align 4,,10
25 .p2align 3
26 .L2:
27 movl $325, %ecx
28 movl %ecx, %eax
29 #APP
30 # 30 "../sysdeps/unix/sysv/linux/mlock2.c" 1
31 syscall
33 # 0 "" 2
34 #NO_APP
35 cmpq $-4096, %rax
36 movq %rax, %rdx
37 ja .L10
38 testl %eax, %eax
39 je .L1
40 movq __libc_errno@gottpoff(%rip), %rcx
41 movl %fs:(%rcx), %edx
42 .L7:
43 cmpl $38, %edx
44 jne .L1
45 movl $22, %fs:(%rcx)
46 movl $-1, %eax
47 ret
48 .p2align 4,,10
49 .p2align 3
50 .L10:
51 movq __libc_errno@gottpoff(%rip), %rcx
52 negl %edx
53 movl $-1, %eax
54 movl %edx, %fs:(%rcx)
55 jmp .L7
56 .p2align 4,,10
57 .p2align 3
58 .L9:
59 movq __libc_errno@gottpoff(%rip), %rdx
60 negl %eax
61 movl %eax, %fs:(%rdx)
62 movl $-1, %eax
63 ret
64 .size mlock2, .-mlock2