ia64/xen-unstable

changeset 17174:c89f6ed56351

x86_emulate: INS/OUTS need Mov attribute to force writeback (since
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>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Mar 03 11:47:40 2008 +0000 (2008-03-03)
parents a142ddb40b1c
children a2359114b6cb
files xen/arch/x86/x86_emulate.c
line diff
     1.1 --- a/xen/arch/x86/x86_emulate.c	Mon Mar 03 11:09:33 2008 +0000
     1.2 +++ b/xen/arch/x86/x86_emulate.c	Mon Mar 03 11:47:40 2008 +0000
     1.3 @@ -106,7 +106,7 @@ static uint8_t opcode_table[256] = {
     1.4      /* 0x68 - 0x6F */
     1.5      ImplicitOps|Mov, DstReg|SrcImm|ModRM|Mov,
     1.6      ImplicitOps|Mov, DstReg|SrcImmByte|ModRM|Mov,
     1.7 -    ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
     1.8 +    ImplicitOps|Mov, ImplicitOps|Mov, ImplicitOps|Mov, ImplicitOps|Mov,
     1.9      /* 0x70 - 0x77 */
    1.10      ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
    1.11      ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
    1.12 @@ -2862,8 +2862,6 @@ x86_emulate(
    1.13          src.orig_val = src.val;
    1.14          src.val = _regs.eax;
    1.15          emulate_2op_SrcV("cmp", src, dst, _regs.eflags);
    1.16 -        /* Always write back. The question is: where to? */
    1.17 -        d |= Mov;
    1.18          if ( _regs.eflags & EFLG_ZF )
    1.19          {
    1.20              /* Success: write back to memory. */