提交 66b85505 编写于 作者: A Avi Kivity

KVM: x86 emulator: initialize src.val and dst.val for register operands

This lets us treat the case where mod == 3 in the same manner as other cases.
Signed-off-by: NAvi Kivity <avi@qumranet.com>
上级 a79d2f18
......@@ -1001,6 +1001,7 @@ x86_decode_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
*/
if ((c->d & ModRM) && c->modrm_mod == 3) {
c->src.type = OP_REG;
c->src.val = c->modrm_val;
break;
}
c->src.type = OP_MEM;
......@@ -1044,6 +1045,7 @@ x86_decode_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
case DstMem:
if ((c->d & ModRM) && c->modrm_mod == 3) {
c->dst.type = OP_REG;
c->dst.val = c->dst.orig_val = c->modrm_val;
break;
}
c->dst.type = OP_MEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册