[XEN] Fix new XCHG emulation.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 5 Jan 2007 18:01:20 +0000 (18:01 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 5 Jan 2007 18:01:20 +0000 (18:01 +0000)
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/x86_emulate.c

index 0df20bd96127b0f30e36d3b46c892d74c847f725..c0d128cd5e5538121b68217bd9ed23629519a122 100644 (file)
@@ -1084,10 +1084,10 @@ x86_emulate(
         if ( !(rex_prefix & 1) )
             break; /* nop */
     case 0x91 ... 0x97: /* xchg reg,%%rax */
-        src.type = OP_REG;
+        src.type = dst.type = OP_REG;
+        src.bytes = dst.bytes = op_bytes;
         src.reg  = (unsigned long *)&_regs.eax;
         src.val  = *src.reg;
-        dst.type = OP_REG;
         dst.reg  = decode_register(
             (b & 7) | ((rex_prefix & 1) << 3), &_regs, 0);
         dst.val  = dst.orig_val = *dst.reg;