ia64/xen-unstable

changeset 16518:6706934cdf9d

x86_emulate: Fix SHLD/SHRD emulation -- cannot rely on dst.orig_val
being already initialised.
From: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Dec 04 11:23:05 2007 +0000 (2007-12-04)
parents 62717554d4cb
children 62451388f630
files xen/arch/x86/x86_emulate.c
line diff
     1.1 --- a/xen/arch/x86/x86_emulate.c	Tue Dec 04 11:16:41 2007 +0000
     1.2 +++ b/xen/arch/x86/x86_emulate.c	Tue Dec 04 11:23:05 2007 +0000
     1.3 @@ -2624,7 +2624,7 @@ x86_emulate(
     1.4          shift = (b & 1) ? (uint8_t)_regs.ecx : insn_fetch_type(uint8_t);
     1.5          if ( (shift &= width - 1) == 0 )
     1.6              break;
     1.7 -        dst.orig_val = truncate_word(dst.orig_val, dst.bytes);
     1.8 +        dst.orig_val = truncate_word(dst.val, dst.bytes);
     1.9          dst.val = ((shift == width) ? src.val :
    1.10                     (b & 8) ?
    1.11                     /* shrd */