ia64/xen-unstable

changeset 10528:869937819ed9

[XEN][EMUL] x86 emulator should support 32-bit offsets in real mode.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@dhcp93.uk.xensource.com
date Tue Jun 27 10:36:51 2006 +0100 (2006-06-27)
parents 9158ecb9045f
children 6604238412be
files xen/arch/x86/x86_emulate.c
line diff
     1.1 --- a/xen/arch/x86/x86_emulate.c	Tue Jun 27 09:54:05 2006 +0100
     1.2 +++ b/xen/arch/x86/x86_emulate.c	Tue Jun 27 10:36:51 2006 +0100
     1.3 @@ -374,9 +374,8 @@ do{ __asm__ __volatile__ (              
     1.4  
     1.5  /* Access/update address held in a register, based on addressing mode. */
     1.6  #define register_address(sel, reg)                                      \
     1.7 -    ((ad_bytes == sizeof(unsigned long)) ? (reg) :                      \
     1.8 -     ((mode == X86EMUL_MODE_REAL) ? /* implies ad_bytes == 2 */         \
     1.9 -      (((unsigned long)(sel) << 4) + ((reg) & 0xffff)) :                \
    1.10 +    (((mode == X86EMUL_MODE_REAL) ? ((unsigned long)(sel) << 4) : 0) +  \
    1.11 +     ((ad_bytes == sizeof(unsigned long)) ? (reg) :                     \
    1.12        ((reg) & ((1UL << (ad_bytes << 3)) - 1))))
    1.13  #define register_address_increment(reg, inc)                            \
    1.14  do {                                                                    \
    1.15 @@ -510,10 +509,6 @@ x86_emulate_memop(
    1.16      }
    1.17   done_prefixes:
    1.18  
    1.19 -    /* Note quite the same as 80386 real mode, but hopefully good enough. */
    1.20 -    if ( (mode == X86EMUL_MODE_REAL) && (ad_bytes != 2) )
    1.21 -        goto cannot_emulate;
    1.22 -
    1.23      /* REX prefix. */
    1.24      if ( (mode == X86EMUL_MODE_PROT64) && ((b & 0xf0) == 0x40) )
    1.25      {