summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2010-08-18 19:25:28 +0300
committerAvi Kivity <avi@redhat.com>2010-10-24 10:51:15 +0200
commit7db41eb76244ae623de842e818e459755968a33b (patch)
tree9661ee9702be3746bb52cbc9ca9d6e5bb4c8fc99
parent39f21ee546cf7d563d813c5fb4473431c1d8fce7 (diff)
downloadlinux-7db41eb76244ae623de842e818e459755968a33b.tar.gz
linux-7db41eb76244ae623de842e818e459755968a33b.tar.bz2
linux-7db41eb76244ae623de842e818e459755968a33b.zip
KVM: x86 emulator: add Src2Imm decoding
Needed for 3-operand IMUL. Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r--arch/x86/kvm/emulate.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 95543a6beb53..f456d7e11b3e 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -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
@@ -2844,6 +2845,9 @@ done_prefixes:
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)