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