Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 615ac125 authored by Guillaume Thouvenin's avatar Guillaume Thouvenin Committed by Avi Kivity
Browse files

KVM: x86 emulator: adds support to mov r,imm (opcode 0xb8) instruction



Add support to mov r, imm (0xb8) instruction.

Signed-off-by: default avatarGuillaume Thouvenin <guillaume.thouvenin@ext.bull.net>
Signed-off-by: default avatarLaurent Vivier <laurent.vivier@bull.net>
Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
parent 954cd36f
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -152,7 +152,8 @@ static u16 opcode_table[256] = {
	ByteOp | ImplicitOps | Mov | String, ImplicitOps | Mov | String,
	ByteOp | ImplicitOps | Mov | String, ImplicitOps | Mov | String,
	ByteOp | ImplicitOps | String, ImplicitOps | String,
	ByteOp | ImplicitOps | String, ImplicitOps | String,
	/* 0xB0 - 0xBF */
	/* 0xB0 - 0xBF */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
	0, 0, 0, 0, 0, 0, 0, 0,
	DstReg | SrcImm | Mov, 0, 0, 0, 0, 0, 0, 0,
	/* 0xC0 - 0xC7 */
	/* 0xC0 - 0xC7 */
	ByteOp | DstMem | SrcImm | ModRM, DstMem | SrcImmByte | ModRM,
	ByteOp | DstMem | SrcImm | ModRM, DstMem | SrcImmByte | ModRM,
	0, ImplicitOps | Stack, 0, 0,
	0, ImplicitOps | Stack, 0, 0,
@@ -1624,6 +1625,8 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
	case 0xae ... 0xaf:	/* scas */
	case 0xae ... 0xaf:	/* scas */
		DPRINTF("Urk! I don't handle SCAS.\n");
		DPRINTF("Urk! I don't handle SCAS.\n");
		goto cannot_emulate;
		goto cannot_emulate;
	case 0xb8: /* mov r, imm */
		goto mov;
	case 0xc0 ... 0xc1:
	case 0xc0 ... 0xc1:
		emulate_grp2(ctxt);
		emulate_grp2(ctxt);
		break;
		break;