]> err.no Git - linux-2.6/commitdiff
KVM: x86 emulator: simplify push imm8 emulation
authorAvi Kivity <avi@qumranet.com>
Thu, 29 May 2008 11:26:29 +0000 (14:26 +0300)
committerAvi Kivity <avi@qumranet.com>
Sun, 20 Jul 2008 09:42:29 +0000 (12:42 +0300)
Instead of fetching the data explicitly, use SrcImmByte.

Signed-off-by: Avi Kivity <avi@qumranet.com>
arch/x86/kvm/x86_emulate.c

index 2a9db4d90bac09c289649bc1b1d48ffda372f5b1..4e037ea8fe643dc49f3efc70537d56970d826340 100644 (file)
@@ -121,7 +121,7 @@ static u16 opcode_table[256] = {
        0, 0, 0, DstReg | SrcMem32 | ModRM | Mov /* movsxd (x86/64) */ ,
        0, 0, 0, 0,
        /* 0x68 - 0x6F */
-       0, 0, ImplicitOps | Mov | Stack, 0,
+       0, 0, SrcImmByte | Mov | Stack, 0,
        SrcNone  | ByteOp  | ImplicitOps, SrcNone  | ImplicitOps, /* insb, insw/insd */
        SrcNone  | ByteOp  | ImplicitOps, SrcNone  | ImplicitOps, /* outsb, outsw/outsd */
        /* 0x70 - 0x77 */
@@ -1425,8 +1425,6 @@ special_insn:
                c->dst.val = (s32) c->src.val;
                break;
        case 0x6a: /* push imm8 */
-               c->src.val = 0L;
-               c->src.val = insn_fetch(s8, 1, c->eip);
                emulate_push(ctxt);
                break;
        case 0x6c:              /* insb */