]> xenbits.xensource.com Git - people/vhanquez/xen.git/commitdiff
x86_emulate: INS/OUTS need Mov attribute to force writeback (since
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 5 Mar 2008 16:45:30 +0000 (16:45 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 5 Mar 2008 16:45:30 +0000 (16:45 +0000)
dst.orig_val is not initialised). Also, Mov attribute on cmpxchg is
not necessary -- when destination is memory (i.e., successful cmpxchg)
then dst.orig_val is already correctly filled in. In case that
dst.orig_val == dst.val then the instruction linearises at the point
we first read the destination (and initialised dst.orig_val).
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   17174:c89f6ed5635179695c92810a9c9eec205e5d0d78
xen-unstable date:        Mon Mar 03 11:47:40 2008 +0000

xen/arch/x86/x86_emulate.c

index 768de31c0968ba050d22c6bb5c511fad4198c0cc..ae2508b8c1e57d73a296bd232fd7720eef59238d 100644 (file)
@@ -105,7 +105,7 @@ static uint8_t opcode_table[256] = {
     /* 0x68 - 0x6F */
     ImplicitOps|Mov, DstReg|SrcImm|ModRM|Mov,
     ImplicitOps|Mov, DstReg|SrcImmByte|ModRM|Mov,
-    ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
+    ImplicitOps|Mov, ImplicitOps|Mov, ImplicitOps|Mov, ImplicitOps|Mov,
     /* 0x70 - 0x77 */
     ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
     ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
@@ -2135,8 +2135,6 @@ x86_emulate(
         src.orig_val = src.val;
         src.val = _regs.eax;
         emulate_2op_SrcV("cmp", src, dst, _regs.eflags);
-        /* Always write back. The question is: where to? */
-        d |= Mov;
         if ( _regs.eflags & EFLG_ZF )
         {
             /* Success: write back to memory. */