diff options
author | Avi Kivity <avi@qumranet.com> | 2008-04-14 16:27:07 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-04-27 11:21:33 -0400 |
commit | 66b85505736dbd3a3a0ed5ae38c12bb218b231c0 (patch) | |
tree | 1515cb412b64efc4b45db4e861943f211f8688f2 /arch/x86/kvm/x86_emulate.c | |
parent | a79d2f1805da02d7837ec2240f0093c53272fb3a (diff) |
KVM: x86 emulator: initialize src.val and dst.val for register operands
This lets us treat the case where mod == 3 in the same manner as other cases.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86/kvm/x86_emulate.c')
-rw-r--r-- | arch/x86/kvm/x86_emulate.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c index f59ed93f5d24..8e1b32f2cd5e 100644 --- a/arch/x86/kvm/x86_emulate.c +++ b/arch/x86/kvm/x86_emulate.c | |||
@@ -1001,6 +1001,7 @@ done_prefixes: | |||
1001 | */ | 1001 | */ |
1002 | if ((c->d & ModRM) && c->modrm_mod == 3) { | 1002 | if ((c->d & ModRM) && c->modrm_mod == 3) { |
1003 | c->src.type = OP_REG; | 1003 | c->src.type = OP_REG; |
1004 | c->src.val = c->modrm_val; | ||
1004 | break; | 1005 | break; |
1005 | } | 1006 | } |
1006 | c->src.type = OP_MEM; | 1007 | c->src.type = OP_MEM; |
@@ -1044,6 +1045,7 @@ done_prefixes: | |||
1044 | case DstMem: | 1045 | case DstMem: |
1045 | if ((c->d & ModRM) && c->modrm_mod == 3) { | 1046 | if ((c->d & ModRM) && c->modrm_mod == 3) { |
1046 | c->dst.type = OP_REG; | 1047 | c->dst.type = OP_REG; |
1048 | c->dst.val = c->dst.orig_val = c->modrm_val; | ||
1047 | break; | 1049 | break; |
1048 | } | 1050 | } |
1049 | c->dst.type = OP_MEM; | 1051 | c->dst.type = OP_MEM; |