clarify the purpose of this project
[nyanglibc.git] / malloc / alloc_buffer_copy_bytes.shared.s
blob40dac4c8c6a7925b3c101f69c362fc0d8cd0b873
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 __GI___libc_alloc_buffer_copy_bytes
9 .hidden __GI___libc_alloc_buffer_copy_bytes
10 .type __GI___libc_alloc_buffer_copy_bytes, @function
11 __GI___libc_alloc_buffer_copy_bytes:
12 pushq %rbp
13 movq %rsi, %rax
14 pushq %rbx
15 subq %rdi, %rax
16 subq $8, %rsp
17 cmpq %rax, %rcx
18 ja .L3
19 testq %rdi, %rdi
20 movq %rsi, %rbx
21 leaq (%rcx,%rdi), %rbp
22 je .L2
23 movq %rdx, %rsi
24 movq %rcx, %rdx
25 call __GI_memcpy@PLT
26 .L2:
27 addq $8, %rsp
28 movq %rbp, %rax
29 movq %rbx, %rdx
30 popq %rbx
31 popq %rbp
32 ret
33 .p2align 4,,10
34 .p2align 3
35 .L3:
36 xorl %ebx, %ebx
37 xorl %ebp, %ebp
38 addq $8, %rsp
39 movq %rbp, %rax
40 movq %rbx, %rdx
41 popq %rbx
42 popq %rbp
43 ret
44 .size __GI___libc_alloc_buffer_copy_bytes, .-__GI___libc_alloc_buffer_copy_bytes
45 .globl __libc_alloc_buffer_copy_bytes
46 .set __libc_alloc_buffer_copy_bytes,__GI___libc_alloc_buffer_copy_bytes