diff options
author | Avi Kivity <avi@redhat.com> | 2010-08-16 10:50:56 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-10-24 04:51:11 -0400 |
commit | fb2c264105c64511dbd1a7488b482960895aace4 (patch) | |
tree | a91a85707f1273e3f6eda11d616d8da55556a4f9 /arch/x86/kvm/emulate.c | |
parent | b3b3d25a12986fb08666823db3e9a74649a71925 (diff) |
KVM: x86 emulator: Use a register for ____emulate_2op() destination
Most x86 two operand instructions allow the destination to be a memory operand,
but IMUL (for example) requires that the destination be a register. Change
____emulate_2op() to take a register for both source and destination so we
can invoke IMUL.
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r-- | arch/x86/kvm/emulate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 7818c91deb63..81b0f8848960 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c | |||
@@ -200,7 +200,7 @@ struct group_dual { | |||
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" (*(_dsttype*)&(_dst).val),\ | 203 | : "=m" (_eflags), "+q" (*(_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) |