From: Avi Kivity <avi@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>, kvm@vger.kernel.org
Subject: [PATCH 3/6] KVM: x86 emulator: simplify emulate_2op_cl()
Date: Wed, 7 Sep 2011 16:41:37 +0300 [thread overview]
Message-ID: <1315402900-8766-4-git-send-email-avi@redhat.com> (raw)
In-Reply-To: <1315402900-8766-1-git-send-email-avi@redhat.com>
emulate_2op_cl() is always called with the same parameters. Simplify
by passing just the emulation context.
Signed-off-by: Avi Kivity <avi@redhat.com>
---
arch/x86/kvm/emulate.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 1bc9e24..70c9f11 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -263,7 +263,7 @@ struct gprefix {
__emulate_2op_nobyte(ctxt, _op, "w", "r", _LO32, "r", "", "r")
/* Instruction has three operands and one operand is stored in ECX register */
-#define __emulate_2op_cl(_op, ctxt, _suffix, _type) \
+#define __emulate_2op_cl(ctxt, _op, _suffix, _type) \
do { \
unsigned long _tmp; \
_type _clv = (ctxt)->src2.val; \
@@ -287,13 +287,13 @@ struct gprefix {
do { \
switch ((ctxt)->dst.bytes) { \
case 2: \
- __emulate_2op_cl(_op, ctxt, "w", u16); \
+ __emulate_2op_cl(ctxt, _op, "w", u16); \
break; \
case 4: \
- __emulate_2op_cl(_op, ctxt, "l", u32); \
+ __emulate_2op_cl(ctxt, _op, "l", u32); \
break; \
case 8: \
- ON64(__emulate_2op_cl(_op, ctxt, "q", ulong)); \
+ ON64(__emulate_2op_cl(ctxt, _op, "q", ulong)); \
break; \
} \
} while (0)
--
1.7.6.1
next prev parent reply other threads:[~2011-09-07 16:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-07 13:41 [PATCH 0/6] Some emulator cleanups Avi Kivity
2011-09-07 13:41 ` [PATCH 1/6] KVM: x86 emulator: simplify emulate_2op_SrcV() Avi Kivity
2011-09-07 13:41 ` [PATCH 2/6] KVM: x86 emulator: simplify emulate_2op_cl() Avi Kivity
2011-09-07 13:41 ` Avi Kivity [this message]
2011-09-07 13:41 ` [PATCH 4/6] KVM: x86 emulator: simplify emulate_1op() Avi Kivity
2011-09-07 13:41 ` [PATCH 5/6] KVM: x86 emulator: merge the two emulate_1op_rax_rdx implementations Avi Kivity
2011-09-07 13:41 ` [PATCH 6/6] KVM: x86 emulator: simplify emulate_1op_rax_rdx() Avi Kivity
2011-09-09 16:20 ` [PATCH 0/6] Some emulator cleanups Marcelo Tosatti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1315402900-8766-4-git-send-email-avi@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox