diff options
author | Avi Kivity <avi@qumranet.com> | 2008-05-29 07:26:29 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-07-20 05:42:29 -0400 |
commit | 19e43636b5af1c8b9cc8406af674835284abab0c (patch) | |
tree | fd5a5e10562f9832c93aac92aaabe6c3110f2f12 /arch/x86/kvm/x86_emulate.c | |
parent | eab9f71feb1851b5b700ca12ae614b6a0a441021 (diff) |
KVM: x86 emulator: simplify push imm8 emulation
Instead of fetching the data explicitly, use SrcImmByte.
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 | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c index 2a9db4d90ba..4e037ea8fe6 100644 --- a/arch/x86/kvm/x86_emulate.c +++ b/arch/x86/kvm/x86_emulate.c | |||
@@ -121,7 +121,7 @@ static u16 opcode_table[256] = { | |||
121 | 0, 0, 0, DstReg | SrcMem32 | ModRM | Mov /* movsxd (x86/64) */ , | 121 | 0, 0, 0, DstReg | SrcMem32 | ModRM | Mov /* movsxd (x86/64) */ , |
122 | 0, 0, 0, 0, | 122 | 0, 0, 0, 0, |
123 | /* 0x68 - 0x6F */ | 123 | /* 0x68 - 0x6F */ |
124 | 0, 0, ImplicitOps | Mov | Stack, 0, | 124 | 0, 0, SrcImmByte | Mov | Stack, 0, |
125 | SrcNone | ByteOp | ImplicitOps, SrcNone | ImplicitOps, /* insb, insw/insd */ | 125 | SrcNone | ByteOp | ImplicitOps, SrcNone | ImplicitOps, /* insb, insw/insd */ |
126 | SrcNone | ByteOp | ImplicitOps, SrcNone | ImplicitOps, /* outsb, outsw/outsd */ | 126 | SrcNone | ByteOp | ImplicitOps, SrcNone | ImplicitOps, /* outsb, outsw/outsd */ |
127 | /* 0x70 - 0x77 */ | 127 | /* 0x70 - 0x77 */ |
@@ -1425,8 +1425,6 @@ special_insn: | |||
1425 | c->dst.val = (s32) c->src.val; | 1425 | c->dst.val = (s32) c->src.val; |
1426 | break; | 1426 | break; |
1427 | case 0x6a: /* push imm8 */ | 1427 | case 0x6a: /* push imm8 */ |
1428 | c->src.val = 0L; | ||
1429 | c->src.val = insn_fetch(s8, 1, c->eip); | ||
1430 | emulate_push(ctxt); | 1428 | emulate_push(ctxt); |
1431 | break; | 1429 | break; |
1432 | case 0x6c: /* insb */ | 1430 | case 0x6c: /* insb */ |