add amd memcpy
[rofl0r-memcpy-test.git] / rep_movsb.c
blob35cc8695922842bf2ea2569b855d56ccb55af83f
1 typedef unsigned long size_t;
2 void *mymemcpy(void *restrict dest, const void *restrict src, size_t n)
4 __asm__("cld; rep; movsb" :: "S"(src),"D"(dest),"c"(n) : "memory");
5 return dest;