diff options
author | Avi Kivity <avi.kivity@gmail.com> | 2013-01-04 09:18:52 -0500 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2013-01-09 14:39:25 -0500 |
commit | 45a1467d7edff741d97a8be28342440ee65aa03c (patch) | |
tree | 84c4fdccb6e594e837a15bedb055e254be1a67fe | |
parent | 75f728456f368140e6b34b6a79f3408774076325 (diff) |
KVM: x86 emulator: convert NOT, NEG to fastop
Acked-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi.kivity@gmail.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
-rw-r--r-- | arch/x86/kvm/emulate.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 2af0c4475605..09dbdc5a99e1 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c | |||
@@ -2050,17 +2050,8 @@ static int em_grp2(struct x86_emulate_ctxt *ctxt) | |||
2050 | return X86EMUL_CONTINUE; | 2050 | return X86EMUL_CONTINUE; |
2051 | } | 2051 | } |
2052 | 2052 | ||
2053 | static int em_not(struct x86_emulate_ctxt *ctxt) | 2053 | FASTOP1(not); |
2054 | { | 2054 | FASTOP1(neg); |
2055 | ctxt->dst.val = ~ctxt->dst.val; | ||
2056 | return X86EMUL_CONTINUE; | ||
2057 | } | ||
2058 | |||
2059 | static int em_neg(struct x86_emulate_ctxt *ctxt) | ||
2060 | { | ||
2061 | emulate_1op(ctxt, "neg"); | ||
2062 | return X86EMUL_CONTINUE; | ||
2063 | } | ||
2064 | 2055 | ||
2065 | static int em_mul_ex(struct x86_emulate_ctxt *ctxt) | 2056 | static int em_mul_ex(struct x86_emulate_ctxt *ctxt) |
2066 | { | 2057 | { |
@@ -3753,8 +3744,8 @@ static const struct opcode group1A[] = { | |||
3753 | static const struct opcode group3[] = { | 3744 | static const struct opcode group3[] = { |
3754 | I(DstMem | SrcImm | NoWrite, em_test), | 3745 | I(DstMem | SrcImm | NoWrite, em_test), |
3755 | I(DstMem | SrcImm | NoWrite, em_test), | 3746 | I(DstMem | SrcImm | NoWrite, em_test), |
3756 | I(DstMem | SrcNone | Lock, em_not), | 3747 | F(DstMem | SrcNone | Lock, em_not), |
3757 | I(DstMem | SrcNone | Lock, em_neg), | 3748 | F(DstMem | SrcNone | Lock, em_neg), |
3758 | I(SrcMem, em_mul_ex), | 3749 | I(SrcMem, em_mul_ex), |
3759 | I(SrcMem, em_imul_ex), | 3750 | I(SrcMem, em_imul_ex), |
3760 | I(SrcMem, em_div_ex), | 3751 | I(SrcMem, em_div_ex), |