Commit 29053a60 authored by Avi Kivity's avatar Avi Kivity

KVM: x86 emulator: simplify emulate_2op_cl()

emulate_2op_cl() is always called with the same parameters.  Simplify
by passing just the emulation context.
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
parent 761441b9
...@@ -263,7 +263,7 @@ struct gprefix { ...@@ -263,7 +263,7 @@ struct gprefix {
__emulate_2op_nobyte(ctxt, _op, "w", "r", _LO32, "r", "", "r") __emulate_2op_nobyte(ctxt, _op, "w", "r", _LO32, "r", "", "r")
/* Instruction has three operands and one operand is stored in ECX register */ /* 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 { \ do { \
unsigned long _tmp; \ unsigned long _tmp; \
_type _clv = (ctxt)->src2.val; \ _type _clv = (ctxt)->src2.val; \
...@@ -287,13 +287,13 @@ struct gprefix { ...@@ -287,13 +287,13 @@ struct gprefix {
do { \ do { \
switch ((ctxt)->dst.bytes) { \ switch ((ctxt)->dst.bytes) { \
case 2: \ case 2: \
__emulate_2op_cl(_op, ctxt, "w", u16); \ __emulate_2op_cl(ctxt, _op, "w", u16); \
break; \ break; \
case 4: \ case 4: \
__emulate_2op_cl(_op, ctxt, "l", u32); \ __emulate_2op_cl(ctxt, _op, "l", u32); \
break; \ break; \
case 8: \ case 8: \
ON64(__emulate_2op_cl(_op, ctxt, "q", ulong)); \ ON64(__emulate_2op_cl(ctxt, _op, "q", ulong)); \
break; \ break; \
} \ } \
} while (0) } while (0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment