clarify the purpose of this project
[nyanglibc.git] / misc / msync.shared.s
blob95299bcc28f0a81638ef4f96fdb68c234c6ec5a5
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 msync
9 .type msync, @function
10 msync:
11 #APP
12 # 25 "../sysdeps/unix/sysv/linux/msync.c" 1
13 movl %fs:24,%eax
14 # 0 "" 2
15 #NO_APP
16 testl %eax, %eax
17 jne .L2
18 movl $26, %eax
19 #APP
20 # 25 "../sysdeps/unix/sysv/linux/msync.c" 1
21 syscall
23 # 0 "" 2
24 #NO_APP
25 cmpq $-4096, %rax
26 ja .L11
27 rep ret
28 .p2align 4,,10
29 .p2align 3
30 .L2:
31 pushq %r12
32 pushq %rbp
33 movl %edx, %r12d
34 pushq %rbx
35 movq %rsi, %rbp
36 movq %rdi, %rbx
37 subq $16, %rsp
38 call __libc_enable_asynccancel
39 movl %r12d, %edx
40 movl %eax, %r8d
41 movq %rbp, %rsi
42 movq %rbx, %rdi
43 movl $26, %eax
44 #APP
45 # 25 "../sysdeps/unix/sysv/linux/msync.c" 1
46 syscall
48 # 0 "" 2
49 #NO_APP
50 cmpq $-4096, %rax
51 ja .L12
52 .L6:
53 movl %r8d, %edi
54 movl %eax, 12(%rsp)
55 call __libc_disable_asynccancel
56 movl 12(%rsp), %eax
57 addq $16, %rsp
58 popq %rbx
59 popq %rbp
60 popq %r12
61 ret
62 .p2align 4,,10
63 .p2align 3
64 .L11:
65 movq __libc_errno@gottpoff(%rip), %rdx
66 negl %eax
67 movl %eax, %fs:(%rdx)
68 movl $-1, %eax
69 ret
70 .L12:
71 movq __libc_errno@gottpoff(%rip), %rdx
72 negl %eax
73 movl %eax, %fs:(%rdx)
74 movl $-1, %eax
75 jmp .L6
76 .size msync, .-msync
77 .hidden __libc_disable_asynccancel
78 .hidden __libc_enable_asynccancel