From 56f46a6eb656ae9d031eb12658fd5c4ecbd6c0a2 Mon Sep 17 00:00:00 2001 From: Takuya Yoshikawa Date: Sat, 23 Apr 2011 18:51:07 +0900 Subject: [PATCH] --- yaml --- r: 248079 b: refs/heads/master c: b96a7fad020b42eb4a564f8a2fb41827a83c4375 h: refs/heads/master i: 248077: 35c1f5dfc84e0200e36441ad8144d06fd802e77c 248075: 091d1c38cb5ff8a3e6c63300ed19a41a224fa42f 248071: 7436db470e71012399d92e8c4b157a137daab348 248063: f2b16ac2e2c1d8d63794a1ef048f5155e3cbb514 v: v3 --- [refs] | 2 +- trunk/arch/x86/kvm/emulate.c | 16 +++++----------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index f685105750e6..61a91d5396be 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c54fe504693204fa672b10a57c3d82a8c41e0b4e +refs/heads/master: b96a7fad020b42eb4a564f8a2fb41827a83c4375 diff --git a/trunk/arch/x86/kvm/emulate.c b/trunk/arch/x86/kvm/emulate.c index 9f491bfb00fd..b7c6e43e4f2b 100644 --- a/trunk/arch/x86/kvm/emulate.c +++ b/trunk/arch/x86/kvm/emulate.c @@ -1473,7 +1473,7 @@ static int emulate_pop_sreg(struct x86_emulate_ctxt *ctxt, return rc; } -static int emulate_pusha(struct x86_emulate_ctxt *ctxt) +static int em_pusha(struct x86_emulate_ctxt *ctxt) { struct decode_cache *c = &ctxt->decode; unsigned long old_esp = c->regs[VCPU_REGS_RSP]; @@ -1494,8 +1494,7 @@ static int emulate_pusha(struct x86_emulate_ctxt *ctxt) return rc; } -static int emulate_popa(struct x86_emulate_ctxt *ctxt, - struct x86_emulate_ops *ops) +static int em_popa(struct x86_emulate_ctxt *ctxt) { struct decode_cache *c = &ctxt->decode; int rc = X86EMUL_CONTINUE; @@ -1508,7 +1507,7 @@ static int emulate_popa(struct x86_emulate_ctxt *ctxt, --reg; } - rc = emulate_pop(ctxt, ops, &c->regs[reg], c->op_bytes); + rc = emulate_pop(ctxt, ctxt->ops, &c->regs[reg], c->op_bytes); if (rc != X86EMUL_CONTINUE) break; --reg; @@ -3098,7 +3097,8 @@ static struct opcode opcode_table[256] = { /* 0x58 - 0x5F */ X8(I(DstReg | Stack, em_pop)), /* 0x60 - 0x67 */ - D(ImplicitOps | Stack | No64), D(ImplicitOps | Stack | No64), + I(ImplicitOps | Stack | No64, em_pusha), + I(ImplicitOps | Stack | No64, em_popa), N, D(DstReg | SrcMem32 | ModRM | Mov) /* movsxd (x86/64) */ , N, N, N, N, /* 0x68 - 0x6F */ @@ -3823,12 +3823,6 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt) case 0x48 ... 0x4f: /* dec r16/r32 */ emulate_1op("dec", c->dst, ctxt->eflags); break; - case 0x60: /* pusha */ - rc = emulate_pusha(ctxt); - break; - case 0x61: /* popa */ - rc = emulate_popa(ctxt, ops); - break; case 0x63: /* movsxd */ if (ctxt->mode != X86EMUL_MODE_PROT64) goto cannot_emulate;