aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/x86_emulate.c
diff options
context:
space:
mode:
authorNitin A Kamble <nitin.a.kamble@intel.com>2007-09-15 03:35:36 -0400
committerAvi Kivity <avi@qumranet.com>2007-10-13 04:18:29 -0400
commit7e0b54b149315743f5743dbc0cf758012682024e (patch)
treeed38ddc94f22ef4a704fd7914dd4b685e8c0bac5 /drivers/kvm/x86_emulate.c
parent55bebde45ec252295b08cb3990f15df2228dbf0e (diff)
KVM: x86 emulator: lea
Implement emulation of instruction lea r16/r32, m opcode: 0x8d: Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/x86_emulate.c')
-rw-r--r--drivers/kvm/x86_emulate.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 57f1a5ad0110..4c78a4ff868f 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -125,7 +125,7 @@ static u8 opcode_table[256] = {
125 /* 0x88 - 0x8F */ 125 /* 0x88 - 0x8F */
126 ByteOp | DstMem | SrcReg | ModRM | Mov, DstMem | SrcReg | ModRM | Mov, 126 ByteOp | DstMem | SrcReg | ModRM | Mov, DstMem | SrcReg | ModRM | Mov,
127 ByteOp | DstReg | SrcMem | ModRM | Mov, DstReg | SrcMem | ModRM | Mov, 127 ByteOp | DstReg | SrcMem | ModRM | Mov, DstReg | SrcMem | ModRM | Mov,
128 0, 0, 0, DstMem | SrcNone | ModRM | Mov, 128 0, ModRM | DstReg, 0, DstMem | SrcNone | ModRM | Mov,
129 /* 0x90 - 0x9F */ 129 /* 0x90 - 0x9F */
130 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ImplicitOps, 0, 0, 0, 130 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ImplicitOps, 0, 0, 0,
131 /* 0xA0 - 0xA7 */ 131 /* 0xA0 - 0xA7 */
@@ -1022,6 +1022,9 @@ push:
1022 break; 1022 break;
1023 case 0x88 ... 0x8b: /* mov */ 1023 case 0x88 ... 0x8b: /* mov */
1024 goto mov; 1024 goto mov;
1025 case 0x8d: /* lea r16/r32, m */
1026 dst.val = modrm_val;
1027 break;
1025 case 0x8f: /* pop (sole member of Grp1a) */ 1028 case 0x8f: /* pop (sole member of Grp1a) */
1026 /* 64-bit mode: POP always pops a 64-bit operand. */ 1029 /* 64-bit mode: POP always pops a 64-bit operand. */
1027 if (mode == X86EMUL_MODE_PROT64) 1030 if (mode == X86EMUL_MODE_PROT64)