Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215743
b: refs/heads/master
c: 40ece7c
h: refs/heads/master
i:
  215741: b9e5a20
  215739: d119e7f
  215735: 39b4924
  215727: 7b1315d
  215711: 6f6dbe2
  215679: 54b6497
v: v3
  • Loading branch information
Avi Kivity committed Oct 24, 2010
1 parent d63ac80 commit 9b782c4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 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: b250e605895d02cede78922d034f7825af72a8b5
refs/heads/master: 40ece7c7297da90e54e147d3bfbb4531f9fbc570
19 changes: 18 additions & 1 deletion trunk/arch/x86/kvm/emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -2249,6 +2249,21 @@ static int em_call_far(struct x86_emulate_ctxt *ctxt)
return X86EMUL_CONTINUE;
}

static int em_ret_near_imm(struct x86_emulate_ctxt *ctxt)
{
struct decode_cache *c = &ctxt->decode;
int rc;

c->dst.type = OP_REG;
c->dst.addr.reg = &c->eip;
c->dst.bytes = c->op_bytes;
rc = emulate_pop(ctxt, ctxt->ops, &c->dst.val, c->op_bytes);
if (rc != X86EMUL_CONTINUE)
return rc;
register_address_increment(c, &c->regs[VCPU_REGS_RSP], c->src.val);
return X86EMUL_CONTINUE;
}

#define D(_y) { .flags = (_y) }
#define N D(0)
#define G(_f, _g) { .flags = ((_f) | Group), .u.group = (_g) }
Expand Down Expand Up @@ -2394,7 +2409,9 @@ static struct opcode opcode_table[256] = {
X8(D(DstReg | SrcImm | Mov)),
/* 0xC0 - 0xC7 */
D(ByteOp | DstMem | SrcImm | ModRM), D(DstMem | SrcImmByte | ModRM),
N, D(ImplicitOps | Stack), N, N,
I(ImplicitOps | Stack | SrcImmU16, em_ret_near_imm),
D(ImplicitOps | Stack),
N, N,
D(ByteOp | DstMem | SrcImm | ModRM | Mov), D(DstMem | SrcImm | ModRM | Mov),
/* 0xC8 - 0xCF */
N, N, N, D(ImplicitOps | Stack),
Expand Down

0 comments on commit 9b782c4

Please sign in to comment.