clarify the purpose of this project
[nyanglibc.git] / io / fallocate64.shared.s
blob09046d080cba43a38d9f1a4fab2b6f36f1f3a0f7
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 fallocate64
9 .type fallocate64, @function
10 fallocate64:
11 movq %rcx, %r10
12 #APP
13 # 27 "../sysdeps/unix/sysv/linux/fallocate64.c" 1
14 movl %fs:24,%eax
15 # 0 "" 2
16 #NO_APP
17 testl %eax, %eax
18 jne .L2
19 movl $285, %eax
20 #APP
21 # 27 "../sysdeps/unix/sysv/linux/fallocate64.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 movq %rcx, %r13
35 pushq %rbp
36 pushq %rbx
37 movq %rdx, %r12
38 movl %esi, %ebp
39 movl %edi, %ebx
40 subq $24, %rsp
41 call __libc_enable_asynccancel
42 movq %r13, %r10
43 movl %eax, %r8d
44 movq %r12, %rdx
45 movl %ebp, %esi
46 movl %ebx, %edi
47 movl $285, %eax
48 #APP
49 # 27 "../sysdeps/unix/sysv/linux/fallocate64.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 fallocate64, .-fallocate64
82 .weak fallocate
83 .set fallocate,fallocate64
84 .hidden __libc_disable_asynccancel
85 .hidden __libc_enable_asynccancel