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