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