aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86_emulate.c
diff options
context:
space:
mode:
authorGuillaume Thouvenin <guillaume.thouvenin@ext.bull.net>2008-09-22 16:08:06 +0200
committerAvi Kivity <avi@redhat.com>2008-12-31 16:51:39 +0200
commit2786b014ec893c301ea52ef9962e7cc60f89f9b3 (patch)
tree61838d3d8494ca9ed3cc9bfccb93c3f9d5b87399 /arch/x86/kvm/x86_emulate.c
parentMerge branch 'for-linus' of git://oss.sgi.com/xfs/xfs (diff)
downloadlinux-dev-2786b014ec893c301ea52ef9962e7cc60f89f9b3.tar.xz
linux-dev-2786b014ec893c301ea52ef9962e7cc60f89f9b3.zip
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 '')
-rw-r--r--arch/x86/kvm/x86_emulate.c8
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:
emulate_1op("dec", c->dst, ctxt->eflags);
break;
case 0x50 ... 0x57: /* push reg */
- c->dst.type = OP_MEM;
- c->dst.bytes = c->op_bytes;
- c->dst.val = c->src.val;
- register_address_increment(c, &c->regs[VCPU_REGS_RSP],
- -c->op_bytes);
- c->dst.ptr = (void *) register_address(
- c, ss_base(ctxt), c->regs[VCPU_REGS_RSP]);
+ emulate_push(ctxt);
break;
case 0x58 ... 0x5f: /* pop reg */
pop_instruction: