Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248079
b: refs/heads/master
c: b96a7fa
h: refs/heads/master
i:
  248077: 35c1f5d
  248075: 091d1c3
  248071: 7436db4
  248063: f2b16ac
v: v3
  • Loading branch information
Takuya Yoshikawa authored and Avi Kivity committed May 22, 2011
1 parent 6582a18 commit 56f46a6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c54fe504693204fa672b10a57c3d82a8c41e0b4e
refs/heads/master: b96a7fad020b42eb4a564f8a2fb41827a83c4375
16 changes: 5 additions & 11 deletions trunk/arch/x86/kvm/emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 56f46a6

Please sign in to comment.