Skip to content

Commit

Permalink
KVM: x86 emulator: add Src2Imm decoding
Browse files Browse the repository at this point in the history
Needed for 3-operand IMUL.

Signed-off-by: Avi Kivity <avi@redhat.com>
  • Loading branch information
Avi Kivity committed Oct 24, 2010
1 parent 39f21ee commit 7db41eb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/x86/kvm/emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
#define Src2CL (1<<29)
#define Src2ImmByte (2<<29)
#define Src2One (3<<29)
#define Src2Imm (4<<29)
#define Src2Mask (7<<29)

#define X2(x...) x, x
Expand Down Expand Up @@ -2844,6 +2845,9 @@ x86_decode_insn(struct x86_emulate_ctxt *ctxt)
c->src2.bytes = 1;
c->src2.val = 1;
break;
case Src2Imm:
rc = decode_imm(ctxt, &c->src2, imm_size(c), true);
break;
}

if (rc != X86EMUL_CONTINUE)
Expand Down

0 comments on commit 7db41eb

Please sign in to comment.