mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-29 13:28:27 +00:00
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: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
parent
93d0494e3e
commit
d9c284c3e9
@ -222,19 +222,11 @@ fin:
|
|||||||
|
|
||||||
void *std_memcpy(void *to, const void *from, unsigned int n)
|
void *std_memcpy(void *to, const void *from, unsigned int n)
|
||||||
{
|
{
|
||||||
/* FIXME: Per-arch support */
|
char *tmp = to;
|
||||||
#if 0
|
const char *s = from;
|
||||||
int d0, d1, d2;
|
|
||||||
asm volatile("rep ; movsl \n"
|
while (n--)
|
||||||
"movl %4,%%ecx \n"
|
*tmp++ = *s++;
|
||||||
"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
|
|
||||||
return to;
|
return to;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user