Commit d9c284c3 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Andrei Vagin

compel: plugins,std -- Implement generic std_memcpy

The routine was #if0ed for a while (taken from older compel), now it's
time to provide any generic version.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 93d0494e
......@@ -222,19 +222,11 @@ fin:
void *std_memcpy(void *to, const void *from, unsigned int n)
{
/* FIXME: Per-arch support */
#if 0
int d0, d1, d2;
asm volatile("rep ; movsl \n"
"movl %4,%%ecx \n"
"andl $3,%%ecx \n"
"jz 1f \n"
"rep ; movsb \n"
"1:"
: "=&c" (d0), "=&D" (d1), "=&S" (d2)
: "0" (n / 4), "g" (n), "1" ((long)to), "2" ((long)from)
: "memory");
#endif
char *tmp = to;
const char *s = from;
while (n--)
*tmp++ = *s++;
return to;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment