[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86_emulate: Fix MUL emulation.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1202407244 0
# Node ID 445edf4089a3ccaca977665423e903b5300832cb
# Parent  e6cf98edf0c573d86c59863c6b861f9a4d6350c3
x86_emulate: Fix MUL emulation.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/x86_emulate.c |    4 ++++
 1 files changed, 4 insertions(+)

diff -r e6cf98edf0c5 -r 445edf4089a3 xen/arch/x86/x86_emulate.c
--- a/xen/arch/x86/x86_emulate.c        Thu Feb 07 13:21:38 2008 +0000
+++ b/xen/arch/x86/x86_emulate.c        Thu Feb 07 18:00:44 2008 +0000
@@ -1710,11 +1710,14 @@ x86_emulate(
             switch ( src.bytes )
             {
             case 1:
+                dst.val = (uint8_t)dst.val;
                 dst.val *= src.val;
                 if ( (uint8_t)dst.val != (uint16_t)dst.val )
                     _regs.eflags |= EFLG_OF|EFLG_CF;
+                dst.bytes = 2;
                 break;
             case 2:
+                dst.val = (uint16_t)dst.val;
                 dst.val *= src.val;
                 if ( (uint16_t)dst.val != (uint32_t)dst.val )
                     _regs.eflags |= EFLG_OF|EFLG_CF;
@@ -1722,6 +1725,7 @@ x86_emulate(
                 break;
 #ifdef __x86_64__
             case 4:
+                dst.val = (uint32_t)dst.val;
                 dst.val *= src.val;
                 if ( (uint32_t)dst.val != dst.val )
                     _regs.eflags |= EFLG_OF|EFLG_CF;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.