clarify the purpose of this project
[nyanglibc.git] / io / sync_file_range.s
blob938dedd212da51fdc0715b693ca733b79cc646b2
1 .text
2 .p2align 4,,15
3 .globl sync_file_range
4 .type sync_file_range, @function
5 sync_file_range:
6 movl %ecx, %r10d
7 #APP
8 # 29 "../sysdeps/unix/sysv/linux/sync_file_range.c" 1
9 movl %fs:24,%eax
10 # 0 "" 2
11 #NO_APP
12 testl %eax, %eax
13 jne .L2
14 movl $277, %eax
15 #APP
16 # 29 "../sysdeps/unix/sysv/linux/sync_file_range.c" 1
17 syscall
19 # 0 "" 2
20 #NO_APP
21 cmpq $-4096, %rax
22 ja .L11
23 rep ret
24 .p2align 4,,10
25 .p2align 3
26 .L2:
27 pushq %r13
28 pushq %r12
29 movl %ecx, %r13d
30 pushq %rbp
31 pushq %rbx
32 movq %rdx, %r12
33 movq %rsi, %rbp
34 movl %edi, %ebx
35 subq $24, %rsp
36 call __libc_enable_asynccancel
37 movl %r13d, %r10d
38 movl %eax, %r8d
39 movq %r12, %rdx
40 movq %rbp, %rsi
41 movl %ebx, %edi
42 movl $277, %eax
43 #APP
44 # 29 "../sysdeps/unix/sysv/linux/sync_file_range.c" 1
45 syscall
47 # 0 "" 2
48 #NO_APP
49 cmpq $-4096, %rax
50 ja .L12
51 .L6:
52 movl %r8d, %edi
53 movl %eax, 12(%rsp)
54 call __libc_disable_asynccancel
55 movl 12(%rsp), %eax
56 addq $24, %rsp
57 popq %rbx
58 popq %rbp
59 popq %r12
60 popq %r13
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 sync_file_range, .-sync_file_range
77 .hidden __libc_disable_asynccancel
78 .hidden __libc_enable_asynccancel