提交 52db3698 编写于 作者: M Miaohe Lin 提交者: Paolo Bonzini

KVM: X86: Add 'else' to unify fastop and execute call path

It also helps eliminate some duplicated code.
Signed-off-by: NMiaohe Lin <linmiaohe@huawei.com>
Reviewed-by: NSean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 91b0d268
...@@ -5683,11 +5683,9 @@ int x86_emulate_insn(struct x86_emulate_ctxt *ctxt) ...@@ -5683,11 +5683,9 @@ int x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
if (ctxt->d & Fastop) { if (ctxt->d & Fastop) {
void (*fop)(struct fastop *) = (void *)ctxt->execute; void (*fop)(struct fastop *) = (void *)ctxt->execute;
rc = fastop(ctxt, fop); rc = fastop(ctxt, fop);
if (rc != X86EMUL_CONTINUE) } else {
goto done; rc = ctxt->execute(ctxt);
goto writeback;
} }
rc = ctxt->execute(ctxt);
if (rc != X86EMUL_CONTINUE) if (rc != X86EMUL_CONTINUE)
goto done; goto done;
goto writeback; goto writeback;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册