ia64/xen-unstable

changeset 15568:0eec072e870a

hvm: Fix memcpy_words() asm in ioemu.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Tue Jul 10 14:42:23 2007 +0100 (2007-07-10)
parents 1f348e70a5af
children f01cb504cf28
files tools/ioemu/target-i386-dm/exec-dm.c
line diff
     1.1 --- a/tools/ioemu/target-i386-dm/exec-dm.c	Tue Jul 10 11:10:38 2007 +0100
     1.2 +++ b/tools/ioemu/target-i386-dm/exec-dm.c	Tue Jul 10 14:42:23 2007 +0100
     1.3 @@ -446,18 +446,16 @@ extern unsigned long logdirty_bitmap_siz
     1.4  #if defined(__x86_64__) || defined(__i386__)
     1.5  static void memcpy_words(void *dst, void *src, size_t n)
     1.6  {
     1.7 -    asm (
     1.8 +    asm volatile (
     1.9          "   movl %%edx,%%ecx \n"
    1.10  #ifdef __x86_64__
    1.11          "   shrl $3,%%ecx    \n"
    1.12 -        "   andl $7,%%edx    \n"
    1.13          "   rep  movsq       \n"
    1.14          "   test $4,%%edx    \n"
    1.15          "   jz   1f          \n"
    1.16          "   movsl            \n"
    1.17  #else /* __i386__ */
    1.18          "   shrl $2,%%ecx    \n"
    1.19 -        "   andl $3,%%edx    \n"
    1.20          "   rep  movsl       \n"
    1.21  #endif
    1.22          "1: test $2,%%edx    \n"
    1.23 @@ -467,7 +465,7 @@ static void memcpy_words(void *dst, void
    1.24          "   jz   1f          \n"
    1.25          "   movsb            \n"
    1.26          "1:                  \n"
    1.27 -        : : "S" (src), "D" (dst), "d" (n) : "ecx" );
    1.28 +        : "+S" (src), "+D" (dst) : "d" (n) : "ecx", "memory" );
    1.29  }
    1.30  #else
    1.31  static void memcpy_words(void *dst, void *src, size_t n)