ia64/xen-unstable

changeset 17009:445edf4089a3

x86_emulate: Fix MUL emulation.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Feb 07 18:00:44 2008 +0000 (2008-02-07)
parents e6cf98edf0c5
children 5e08872c24f7
files xen/arch/x86/x86_emulate.c
line diff
     1.1 --- a/xen/arch/x86/x86_emulate.c	Thu Feb 07 13:21:38 2008 +0000
     1.2 +++ b/xen/arch/x86/x86_emulate.c	Thu Feb 07 18:00:44 2008 +0000
     1.3 @@ -1710,11 +1710,14 @@ x86_emulate(
     1.4              switch ( src.bytes )
     1.5              {
     1.6              case 1:
     1.7 +                dst.val = (uint8_t)dst.val;
     1.8                  dst.val *= src.val;
     1.9                  if ( (uint8_t)dst.val != (uint16_t)dst.val )
    1.10                      _regs.eflags |= EFLG_OF|EFLG_CF;
    1.11 +                dst.bytes = 2;
    1.12                  break;
    1.13              case 2:
    1.14 +                dst.val = (uint16_t)dst.val;
    1.15                  dst.val *= src.val;
    1.16                  if ( (uint16_t)dst.val != (uint32_t)dst.val )
    1.17                      _regs.eflags |= EFLG_OF|EFLG_CF;
    1.18 @@ -1722,6 +1725,7 @@ x86_emulate(
    1.19                  break;
    1.20  #ifdef __x86_64__
    1.21              case 4:
    1.22 +                dst.val = (uint32_t)dst.val;
    1.23                  dst.val *= src.val;
    1.24                  if ( (uint32_t)dst.val != dst.val )
    1.25                      _regs.eflags |= EFLG_OF|EFLG_CF;