[xen-unstable] x86_emulate: Fix SHLD/SHRD emulation -- cannot rely on dst.orig_val

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen-unstable] x86_emulate: Fix SHLD/SHRD emulation -- cannot rely on dst.orig_val

Xen patchbot-unstable
# HG changeset patch
# User Keir Fraser <[hidden email]>
# Date 1196767385 0
# Node ID 6706934cdf9d5d7110d97c5186dd5292e717cd5f
# Parent  62717554d4cb72eac230b67054e844c18ab918d7
x86_emulate: Fix SHLD/SHRD emulation -- cannot rely on dst.orig_val
being already initialised.
From: Dexuan Cui <[hidden email]>
Signed-off-by: Keir Fraser <[hidden email]>
---
 xen/arch/x86/x86_emulate.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 62717554d4cb -r 6706934cdf9d xen/arch/x86/x86_emulate.c
--- a/xen/arch/x86/x86_emulate.c Tue Dec 04 11:16:41 2007 +0000
+++ b/xen/arch/x86/x86_emulate.c Tue Dec 04 11:23:05 2007 +0000
@@ -2624,7 +2624,7 @@ x86_emulate(
         shift = (b & 1) ? (uint8_t)_regs.ecx : insn_fetch_type(uint8_t);
         if ( (shift &= width - 1) == 0 )
             break;
-        dst.orig_val = truncate_word(dst.orig_val, dst.bytes);
+        dst.orig_val = truncate_word(dst.val, dst.bytes);
         dst.val = ((shift == width) ? src.val :
                    (b & 8) ?
                    /* shrd */

_______________________________________________
Xen-changelog mailing list
[hidden email]
http://lists.xensource.com/xen-changelog