Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 103736
b: refs/heads/master
c: 84411d8
h: refs/heads/master
v: v3
  • Loading branch information
Avi Kivity committed Jul 20, 2008
1 parent d6b5ce4 commit 5b1c1e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 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: dc71d0f1620790ec8e54101ca37e7b31e31208a8
refs/heads/master: 84411d85dacdb6665578608c6a70fc8b819761a8
17 changes: 4 additions & 13 deletions trunk/arch/x86/kvm/x86_emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -740,9 +740,7 @@ static int decode_modrm(struct x86_emulate_ctxt *ctxt,
c->modrm_ea = (u16)c->modrm_ea;
} else {
/* 32/64-bit ModR/M decode. */
switch (c->modrm_rm) {
case 4:
case 12:
if ((c->modrm_rm & 7) == 4) {
sib = insn_fetch(u8, 1, c->eip);
index_reg |= (sib >> 3) & 7;
base_reg |= sib & 7;
Expand All @@ -754,18 +752,11 @@ static int decode_modrm(struct x86_emulate_ctxt *ctxt,
c->modrm_ea += c->regs[base_reg];
if (index_reg != 4)
c->modrm_ea += c->regs[index_reg] << scale;
break;
case 5:
case 13:
if (c->modrm_mod != 0)
c->modrm_ea += c->regs[c->modrm_rm];
else if (ctxt->mode == X86EMUL_MODE_PROT64)
} else if ((c->modrm_rm & 7) == 5 && c->modrm_mod == 0) {
if (ctxt->mode == X86EMUL_MODE_PROT64)
rip_relative = 1;
break;
default:
} else
c->modrm_ea += c->regs[c->modrm_rm];
break;
}
switch (c->modrm_mod) {
case 0:
if (c->modrm_rm == 5)
Expand Down

0 comments on commit 5b1c1e6

Please sign in to comment.