clarify the purpose of this project
[nyanglibc.git] / debug / wcpcpy_chk.shared.s
blob05ea7bd4776e80ecd4e2bed7f571bbdcc582fb5b
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 __wcpcpy_chk
9 .type __wcpcpy_chk, @function
10 __wcpcpy_chk:
11 subq %rdi, %rsi
12 leaq -4(%rdi), %rax
13 xorl %ecx, %ecx
14 sarq $2, %rsi
15 leaq 4(,%rsi,4), %rdi
16 jmp .L3
17 .p2align 4,,10
18 .p2align 3
19 .L2:
20 movl (%rax,%rdi), %esi
21 addq $1, %rcx
22 addq $4, %rax
23 testl %esi, %esi
24 movl %esi, (%rax)
25 je .L9
26 .L3:
27 cmpq %rdx, %rcx
28 jne .L2
29 subq $8, %rsp
30 call __GI___chk_fail
31 .L9:
32 ret
33 .size __wcpcpy_chk, .-__wcpcpy_chk