diff options
author | Avi Kivity <avi.kivity@gmail.com> | 2013-01-19 12:51:57 -0500 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2013-01-23 19:15:40 -0500 |
commit | 158de57f905ed97ea0f993feac1c40a40f5c7a04 (patch) | |
tree | 289d14cf96cd1253cb3b6ba70b9b9bc53ea24841 /arch/x86/kvm/emulate.c | |
parent | 34b77652b9e98b5796b3a69df600e1717572e51d (diff) |
KVM: x86 emulator: convert a few freestanding emulations to fastop
Reviewed-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi.kivity@gmail.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r-- | arch/x86/kvm/emulate.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index d06354d9a16a..e99fb72cd4c5 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c | |||
@@ -2209,7 +2209,7 @@ static int em_cmpxchg(struct x86_emulate_ctxt *ctxt) | |||
2209 | /* Save real source value, then compare EAX against destination. */ | 2209 | /* Save real source value, then compare EAX against destination. */ |
2210 | ctxt->src.orig_val = ctxt->src.val; | 2210 | ctxt->src.orig_val = ctxt->src.val; |
2211 | ctxt->src.val = reg_read(ctxt, VCPU_REGS_RAX); | 2211 | ctxt->src.val = reg_read(ctxt, VCPU_REGS_RAX); |
2212 | emulate_2op_SrcV(ctxt, "cmp"); | 2212 | fastop(ctxt, em_cmp); |
2213 | 2213 | ||
2214 | if (ctxt->eflags & EFLG_ZF) { | 2214 | if (ctxt->eflags & EFLG_ZF) { |
2215 | /* Success: write back to memory. */ | 2215 | /* Success: write back to memory. */ |
@@ -2977,7 +2977,7 @@ static int em_das(struct x86_emulate_ctxt *ctxt) | |||
2977 | ctxt->src.type = OP_IMM; | 2977 | ctxt->src.type = OP_IMM; |
2978 | ctxt->src.val = 0; | 2978 | ctxt->src.val = 0; |
2979 | ctxt->src.bytes = 1; | 2979 | ctxt->src.bytes = 1; |
2980 | emulate_2op_SrcV(ctxt, "or"); | 2980 | fastop(ctxt, em_or); |
2981 | ctxt->eflags &= ~(X86_EFLAGS_AF | X86_EFLAGS_CF); | 2981 | ctxt->eflags &= ~(X86_EFLAGS_AF | X86_EFLAGS_CF); |
2982 | if (cf) | 2982 | if (cf) |
2983 | ctxt->eflags |= X86_EFLAGS_CF; | 2983 | ctxt->eflags |= X86_EFLAGS_CF; |
@@ -4816,7 +4816,7 @@ twobyte_insn: | |||
4816 | (s16) ctxt->src.val; | 4816 | (s16) ctxt->src.val; |
4817 | break; | 4817 | break; |
4818 | case 0xc0 ... 0xc1: /* xadd */ | 4818 | case 0xc0 ... 0xc1: /* xadd */ |
4819 | emulate_2op_SrcV(ctxt, "add"); | 4819 | fastop(ctxt, em_add); |
4820 | /* Write back the register source. */ | 4820 | /* Write back the register source. */ |
4821 | ctxt->src.val = ctxt->dst.orig_val; | 4821 | ctxt->src.val = ctxt->dst.orig_val; |
4822 | write_register_operand(&ctxt->src); | 4822 | write_register_operand(&ctxt->src); |