Skip to content

Commit 7e0b54b

Browse files
Nitin A Kambleavikivity
authored andcommitted
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>
1 parent 55bebde commit 7e0b54b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/kvm/x86_emulate.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ static u8 opcode_table[256] = {
125125
/* 0x88 - 0x8F */
126126
ByteOp | DstMem | SrcReg | ModRM | Mov, DstMem | SrcReg | ModRM | Mov,
127127
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,
129129
/* 0x90 - 0x9F */
130130
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ImplicitOps, 0, 0, 0,
131131
/* 0xA0 - 0xA7 */
@@ -1022,6 +1022,9 @@ x86_emulate_memop(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
10221022
break;
10231023
case 0x88 ... 0x8b: /* mov */
10241024
goto mov;
1025+
case 0x8d: /* lea r16/r32, m */
1026+
dst.val = modrm_val;
1027+
break;
10251028
case 0x8f: /* pop (sole member of Grp1a) */
10261029
/* 64-bit mode: POP always pops a 64-bit operand. */
10271030
if (mode == X86EMUL_MODE_PROT64)

0 commit comments

Comments
 (0)