aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm
diff options
context:
space:
mode:
authorNitin A Kamble <nitin.a.kamble@intel.com>2007-08-28 20:58:52 -0400
committerAvi Kivity <avi@qumranet.com>2007-10-13 04:18:28 -0400
commit7d316911632acb8ba8cb7c1dd318ba723c9f1d50 (patch)
tree458b003794584fc80163339b468e2435b4470fbf /drivers/kvm
parentbfdaab090386e7dda8c442721eeb91179258dad4 (diff)
KVM: x86 emulator: push imm8
Implement the instruction push imm8 opcode: 0x6a Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm')
-rw-r--r--drivers/kvm/x86_emulate.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 86171ca794dd..4fc2da6aae7d 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -104,10 +104,11 @@ static u8 opcode_table[256] = {
104 /* 0x58 - 0x5F */ 104 /* 0x58 - 0x5F */
105 ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps, 105 ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
106 ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps, 106 ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
107 /* 0x60 - 0x6B */ 107 /* 0x60 - 0x67 */
108 0, 0, 0, DstReg | SrcMem32 | ModRM | Mov /* movsxd (x86/64) */ , 108 0, 0, 0, DstReg | SrcMem32 | ModRM | Mov /* movsxd (x86/64) */ ,
109 0, 0, 0, 0, 0, 0, 0, 0, 109 0, 0, 0, 0,
110 /* 0x6C - 0x6F */ 110 /* 0x68 - 0x6F */
111 0, 0, ImplicitOps|Mov, 0,
111 SrcNone | ByteOp | ImplicitOps, SrcNone | ImplicitOps, /* insb, insw/insd */ 112 SrcNone | ByteOp | ImplicitOps, SrcNone | ImplicitOps, /* insb, insw/insd */
112 SrcNone | ByteOp | ImplicitOps, SrcNone | ImplicitOps, /* outsb, outsw/outsd */ 113 SrcNone | ByteOp | ImplicitOps, SrcNone | ImplicitOps, /* outsb, outsw/outsd */
113 /* 0x70 - 0x7F */ 114 /* 0x70 - 0x7F */
@@ -919,6 +920,16 @@ done_prefixes:
919 goto cannot_emulate; 920 goto cannot_emulate;
920 dst.val = (s32) src.val; 921 dst.val = (s32) src.val;
921 break; 922 break;
923 case 0x6a: /* push imm8 */
924 src.val = 0L;
925 src.val = insn_fetch(s8, 1, _eip);
926push:
927 dst.type = OP_MEM;
928 dst.bytes = op_bytes;
929 dst.val = src.val;
930 register_address_increment(_regs[VCPU_REGS_RSP], -op_bytes);
931 dst.ptr = register_address(ctxt->ss_base, _regs[VCPU_REGS_RSP]);
932 break;
922 case 0x80 ... 0x83: /* Grp1 */ 933 case 0x80 ... 0x83: /* Grp1 */
923 switch (modrm_reg) { 934 switch (modrm_reg) {
924 case 0: 935 case 0: