aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2010-08-16 10:49:52 -0400
committerAvi Kivity <avi@redhat.com>2010-10-24 04:51:11 -0400
commitb3b3d25a12986fb08666823db3e9a74649a71925 (patch)
tree3f363712883800fe66b0589f070f1a613ade4e57 /arch/x86/kvm
parentf2f31845341d22e4f20438b05e83d58e71b723b5 (diff)
KVM: x86 emulator: pass destination type to ____emulate_2op()
We'll need it later so we can use a register for the destination. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r--arch/x86/kvm/emulate.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 2f816edfe31e..7818c91deb63 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -194,13 +194,13 @@ struct group_dual {
194#define ON64(x) 194#define ON64(x)
195#endif 195#endif
196 196
197#define ____emulate_2op(_op, _src, _dst, _eflags, _x, _y, _suffix) \ 197#define ____emulate_2op(_op, _src, _dst, _eflags, _x, _y, _suffix, _dsttype) \
198 do { \ 198 do { \
199 __asm__ __volatile__ ( \ 199 __asm__ __volatile__ ( \
200 _PRE_EFLAGS("0", "4", "2") \ 200 _PRE_EFLAGS("0", "4", "2") \
201 _op _suffix " %"_x"3,%1; " \ 201 _op _suffix " %"_x"3,%1; " \
202 _POST_EFLAGS("0", "4", "2") \ 202 _POST_EFLAGS("0", "4", "2") \
203 : "=m" (_eflags), "=m" ((_dst).val), \ 203 : "=m" (_eflags), "=m" (*(_dsttype*)&(_dst).val),\
204 "=&r" (_tmp) \ 204 "=&r" (_tmp) \
205 : _y ((_src).val), "i" (EFLAGS_MASK)); \ 205 : _y ((_src).val), "i" (EFLAGS_MASK)); \
206 } while (0) 206 } while (0)
@@ -213,13 +213,13 @@ struct group_dual {
213 \ 213 \
214 switch ((_dst).bytes) { \ 214 switch ((_dst).bytes) { \
215 case 2: \ 215 case 2: \
216 ____emulate_2op(_op,_src,_dst,_eflags,_wx,_wy,"w"); \ 216 ____emulate_2op(_op,_src,_dst,_eflags,_wx,_wy,"w",u16);\
217 break; \ 217 break; \
218 case 4: \ 218 case 4: \
219 ____emulate_2op(_op,_src,_dst,_eflags,_lx,_ly,"l"); \ 219 ____emulate_2op(_op,_src,_dst,_eflags,_lx,_ly,"l",u32);\
220 break; \ 220 break; \
221 case 8: \ 221 case 8: \
222 ON64(____emulate_2op(_op,_src,_dst,_eflags,_qx,_qy,"q")); \ 222 ON64(____emulate_2op(_op,_src,_dst,_eflags,_qx,_qy,"q",u64)); \
223 break; \ 223 break; \
224 } \ 224 } \
225 } while (0) 225 } while (0)
@@ -229,7 +229,7 @@ struct group_dual {
229 unsigned long _tmp; \ 229 unsigned long _tmp; \
230 switch ((_dst).bytes) { \ 230 switch ((_dst).bytes) { \
231 case 1: \ 231 case 1: \
232 ____emulate_2op(_op,_src,_dst,_eflags,_bx,_by,"b"); \ 232 ____emulate_2op(_op,_src,_dst,_eflags,_bx,_by,"b",u8); \
233 break; \ 233 break; \
234 default: \ 234 default: \
235 __emulate_2op_nobyte(_op, _src, _dst, _eflags, \ 235 __emulate_2op_nobyte(_op, _src, _dst, _eflags, \