]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
KVM: x86 emulator: switch 'pop reg' instruction to emulate_pop()
authorAvi Kivity <avi@redhat.com>
Thu, 27 Nov 2008 16:06:33 +0000 (18:06 +0200)
committerAvi Kivity <avi@redhat.com>
Wed, 31 Dec 2008 14:55:04 +0000 (16:55 +0200)
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/x86_emulate.c

index 70242f5f0964ab0744fd3ba3e57af84a98b5b2ae..702de9869c193f6c2d576565e55d9804673b799b 100644 (file)
@@ -1389,14 +1389,11 @@ special_insn:
                break;
        case 0x58 ... 0x5f: /* pop reg */
        pop_instruction:
-               if ((rc = ops->read_std(register_address(c, ss_base(ctxt),
-                       c->regs[VCPU_REGS_RSP]), c->dst.ptr,
-                       c->op_bytes, ctxt->vcpu)) != 0)
+               c->src.bytes = c->op_bytes;
+               rc = emulate_pop(ctxt, ops);
+               if (rc != 0)
                        goto done;
-
-               register_address_increment(c, &c->regs[VCPU_REGS_RSP],
-                                          c->op_bytes);
-               c->dst.type = OP_NONE;  /* Disable writeback. */
+               c->dst.val = c->src.val;
                break;
        case 0x63:              /* movsxd */
                if (ctxt->mode != X86EMUL_MODE_PROT64)