ia64/xen-unstable

changeset 12684:b1d538e557ee

[XEN] Fix SIB byte decode when extended by REX.X and REX.B.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Thu Nov 30 14:04:36 2006 +0000 (2006-11-30)
parents 5d6be0099bdf
children e7cb5813e2a7
files xen/arch/x86/x86_emulate.c
line diff
     1.1 --- a/xen/arch/x86/x86_emulate.c	Thu Nov 30 13:05:27 2006 +0000
     1.2 +++ b/xen/arch/x86/x86_emulate.c	Thu Nov 30 14:04:36 2006 +0000
     1.3 @@ -611,8 +611,8 @@ x86_emulate_memop(
     1.4              if ( modrm_rm == 4 )
     1.5              {
     1.6                  sib = insn_fetch(uint8_t);
     1.7 -                sib_index = ((sib >> 3) & 7) | ((modrm << 2) & 8);
     1.8 -                sib_base  = (sib & 7) | ((modrm << 3) & 8);
     1.9 +                sib_index = ((sib >> 3) & 7) | ((rex_prefix << 2) & 8);
    1.10 +                sib_base  = (sib & 7) | ((rex_prefix << 3) & 8);
    1.11                  if ( sib_index != 4 )
    1.12                      ea_off = *(long *)decode_register(sib_index, &_regs, 0);
    1.13                  ea_off <<= (sib >> 6) & 3;