Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 125262
b: refs/heads/master
c: faa5a3a
h: refs/heads/master
v: v3
  • Loading branch information
Avi Kivity committed Dec 31, 2008
1 parent 6cf5f3e commit b8f2fa3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 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: b82091824ee4970adf92d5cd6d57b12273171625
refs/heads/master: faa5a3ae39483aefc46a78299c811194f953af27
21 changes: 17 additions & 4 deletions trunk/arch/x86/kvm/x86_emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1057,20 +1057,33 @@ static inline void emulate_push(struct x86_emulate_ctxt *ctxt)
c->regs[VCPU_REGS_RSP]);
}

static inline int emulate_grp1a(struct x86_emulate_ctxt *ctxt,
struct x86_emulate_ops *ops)
static int emulate_pop(struct x86_emulate_ctxt *ctxt,
struct x86_emulate_ops *ops)
{
struct decode_cache *c = &ctxt->decode;
int rc;

rc = ops->read_std(register_address(c, ss_base(ctxt),
c->regs[VCPU_REGS_RSP]),
&c->dst.val, c->dst.bytes, ctxt->vcpu);
&c->src.val, c->src.bytes, ctxt->vcpu);
if (rc != 0)
return rc;

register_address_increment(c, &c->regs[VCPU_REGS_RSP], c->dst.bytes);
register_address_increment(c, &c->regs[VCPU_REGS_RSP], c->src.bytes);
return rc;
}

static inline int emulate_grp1a(struct x86_emulate_ctxt *ctxt,
struct x86_emulate_ops *ops)
{
struct decode_cache *c = &ctxt->decode;
int rc;

c->src.bytes = c->dst.bytes;
rc = emulate_pop(ctxt, ops);
if (rc != 0)
return rc;
c->dst.val = c->src.val;
return 0;
}

Expand Down

0 comments on commit b8f2fa3

Please sign in to comment.