clarify the purpose of this project
[nyanglibc.git] / string / strncat.s
blob91f52c8e04108f58f6f7e73780e5ec7d21d6f04b
1 .text
2 .p2align 4,,15
3 .globl strncat
4 .type strncat, @function
5 strncat:
6 pushq %r13
7 pushq %r12
8 movq %rdx, %r13
9 pushq %rbp
10 pushq %rbx
11 movq %rdi, %rbp
12 movq %rsi, %r12
13 subq $8, %rsp
14 call strlen
15 leaq 0(%rbp,%rax), %rbx
16 movq %r13, %rsi
17 movq %r12, %rdi
18 call __strnlen
19 movq %r12, %rsi
20 movb $0, (%rbx,%rax)
21 movq %rbx, %rdi
22 movq %rax, %rdx
23 call memcpy@PLT
24 addq $8, %rsp
25 movq %rbp, %rax
26 popq %rbx
27 popq %rbp
28 popq %r12
29 popq %r13
30 ret
31 .size strncat, .-strncat
32 .globl __strncat
33 .hidden __strncat
34 .set __strncat,strncat
35 .hidden __strnlen
36 .hidden strlen