diff options
author | Guillaume Thouvenin <guillaume.thouvenin@ext.bull.net> | 2008-09-22 10:08:06 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-12-31 09:51:39 -0500 |
commit | 2786b014ec893c301ea52ef9962e7cc60f89f9b3 (patch) | |
tree | 61838d3d8494ca9ed3cc9bfccb93c3f9d5b87399 /arch | |
parent | 6a94cb73064c952255336cc57731904174b2c58f (diff) |
KVM: x86 emulator: consolidate push reg
This patch consolidate the emulation of push reg instruction.
Signed-off-by: Guillaume Thouvenin <guillaume.thouvenin@bull.net>
Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kvm/x86_emulate.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c index ea051173b0da..a391e213fe61 100644 --- a/arch/x86/kvm/x86_emulate.c +++ b/arch/x86/kvm/x86_emulate.c | |||
@@ -1415,13 +1415,7 @@ special_insn: | |||
1415 | emulate_1op("dec", c->dst, ctxt->eflags); | 1415 | emulate_1op("dec", c->dst, ctxt->eflags); |
1416 | break; | 1416 | break; |
1417 | case 0x50 ... 0x57: /* push reg */ | 1417 | case 0x50 ... 0x57: /* push reg */ |
1418 | c->dst.type = OP_MEM; | 1418 | emulate_push(ctxt); |
1419 | c->dst.bytes = c->op_bytes; | ||
1420 | c->dst.val = c->src.val; | ||
1421 | register_address_increment(c, &c->regs[VCPU_REGS_RSP], | ||
1422 | -c->op_bytes); | ||
1423 | c->dst.ptr = (void *) register_address( | ||
1424 | c, ss_base(ctxt), c->regs[VCPU_REGS_RSP]); | ||
1425 | break; | 1419 | break; |
1426 | case 0x58 ... 0x5f: /* pop reg */ | 1420 | case 0x58 ... 0x5f: /* pop reg */ |
1427 | pop_instruction: | 1421 | pop_instruction: |