clarify the purpose of this project
[nyanglibc.git] / debug / wcscpy_chk.s
blob7220775eee26b124327341ee0e5e3213fc1bf022
1 .text
2 .p2align 4,,15
3 .globl __wcscpy_chk
4 .type __wcscpy_chk, @function
5 __wcscpy_chk:
6 movq %rdi, %r8
7 xorl %ecx, %ecx
8 subq %rsi, %r8
9 sarq $2, %r8
10 leaq -4(%rsi,%r8,4), %r9
11 jmp .L3
12 .p2align 4,,10
13 .p2align 3
14 .L2:
15 movl (%rsi,%rcx,4), %r8d
16 movl %r8d, 4(%r9,%rcx,4)
17 addq $1, %rcx
18 testl %r8d, %r8d
19 je .L9
20 .L3:
21 cmpq %rdx, %rcx
22 jne .L2
23 subq $8, %rsp
24 call __chk_fail
25 .p2align 4,,10
26 .p2align 3
27 .L9:
28 movq %rdi, %rax
29 ret
30 .size __wcscpy_chk, .-__wcscpy_chk
31 .hidden __chk_fail