blob: f8607cfc50542acb785e9f2d526607548ba905cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#include <string.h>
void *memcpy(void *dest, const void *src, size_t n)
{
unsigned long d0, d1, d2;
asm volatile(
"rep movsb"
: "=S"(d0), "=D"(d1), "=c"(d2)
: "0"(src), "1"(dest), "2"(n)
: "memory"
);
return dest;
}
|