|
1#include <stddef.h>
2
3void *
4memcpy1 (void *d, void *s, size_t n)
5{
6 char *d1 = d;
7 char *s1 = s;
8
9 while (n--)
10 *d1++ = *s1++;
11
12 return d;
13}
|
1 memcpy1:
2 testq %rdx, %rdx
3 je .L2
4 movl $0, %ecx
5 .L3:
6 movzbl (%rsi,%rcx), %eax
7 movb %al, (%rdi,%rcx)
8 addq $1, %rcx
9 cmpq %rdx, %rcx
10 jne .L3
11 .L2:
12 movq %rdi, %rax
13 ret
|
| Letzte Änderung: 09.11.2009 | © Prof. Dr. Uwe Schmidt |