ia64/xen-unstable

changeset 13321:9ba91a854787

[XEN] Emulate MOV imm->reg.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@localhost.localdomain
date Sat Jan 06 15:56:52 2007 +0000 (2007-01-06)
parents d3e40fd6038e
children c89384734c19 416d3086a572
files xen/arch/x86/x86_emulate.c
line diff
     1.1 --- a/xen/arch/x86/x86_emulate.c	Sat Jan 06 12:56:58 2007 +0000
     1.2 +++ b/xen/arch/x86/x86_emulate.c	Sat Jan 06 15:56:52 2007 +0000
     1.3 @@ -111,8 +111,14 @@ static uint8_t opcode_table[256] = {
     1.4      /* 0xA8 - 0xAF */
     1.5      0, 0, ByteOp|ImplicitOps|Mov, ImplicitOps|Mov,
     1.6      ByteOp|ImplicitOps|Mov, ImplicitOps|Mov, 0, 0,
     1.7 -    /* 0xB0 - 0xBF */
     1.8 -    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
     1.9 +    /* 0xB0 - 0xB7 */
    1.10 +    ByteOp|DstReg|SrcImm|Mov, ByteOp|DstReg|SrcImm|Mov,
    1.11 +    ByteOp|DstReg|SrcImm|Mov, ByteOp|DstReg|SrcImm|Mov,
    1.12 +    ByteOp|DstReg|SrcImm|Mov, ByteOp|DstReg|SrcImm|Mov,
    1.13 +    ByteOp|DstReg|SrcImm|Mov, ByteOp|DstReg|SrcImm|Mov,
    1.14 +    /* 0xB8 - 0xBF */
    1.15 +    DstReg|SrcImm|Mov, DstReg|SrcImm|Mov, DstReg|SrcImm|Mov, DstReg|SrcImm|Mov,
    1.16 +    DstReg|SrcImm|Mov, DstReg|SrcImm|Mov, DstReg|SrcImm|Mov, DstReg|SrcImm|Mov,
    1.17      /* 0xC0 - 0xC7 */
    1.18      ByteOp|DstMem|SrcImm|ModRM, DstMem|SrcImmByte|ModRM, 0, 0,
    1.19      0, 0, ByteOp|DstMem|SrcImm|ModRM|Mov, DstMem|SrcImm|ModRM|Mov,
    1.20 @@ -906,6 +912,19 @@ x86_emulate(
    1.21              goto done;
    1.22          register_address_increment(_regs.esp, dst.bytes);
    1.23          break;
    1.24 +    case 0xb0 ... 0xb7: /* mov imm8,r8 */
    1.25 +        dst.reg = decode_register(
    1.26 +            (b & 7) | ((rex_prefix & 1) << 3), &_regs, (rex_prefix == 0));
    1.27 +        dst.val = src.val;
    1.28 +        break;
    1.29 +    case 0xb8 ... 0xbf: /* mov imm{16,32,64},r{16,32,64} */
    1.30 +        if ( dst.bytes == 8 ) /* Fetch more bytes to obtain imm64 */
    1.31 +            src.val = ((uint32_t)src.val |
    1.32 +                       ((uint64_t)insn_fetch_type(uint32_t) << 32));
    1.33 +        dst.reg = decode_register(
    1.34 +            (b & 7) | ((rex_prefix & 1) << 3), &_regs, 0);
    1.35 +        dst.val = src.val;
    1.36 +        break;
    1.37      case 0xc0 ... 0xc1: grp2: /* Grp2 */
    1.38          switch ( modrm_reg & 7 )
    1.39          {