Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 103735
b: refs/heads/master
c: dc71d0f
h: refs/heads/master
i:
  103733: b18edfc
  103731: 2f027c7
  103727: 5647cad
v: v3
  • Loading branch information
Avi Kivity committed Jul 20, 2008
1 parent 2beafbd commit d6b5ce4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 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: 8684c0af0b2bab770c257e2a04e1546eed35fa56
refs/heads/master: dc71d0f1620790ec8e54101ca37e7b31e31208a8
20 changes: 4 additions & 16 deletions trunk/arch/x86/kvm/x86_emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -748,24 +748,12 @@ static int decode_modrm(struct x86_emulate_ctxt *ctxt,
base_reg |= sib & 7;
scale = sib >> 6;

switch (base_reg) {
case 5:
case 13:
if (c->modrm_mod != 0)
c->modrm_ea += c->regs[base_reg];
else
c->modrm_ea +=
insn_fetch(s32, 4, c->eip);
break;
default:
if ((base_reg & 7) == 5 && c->modrm_mod == 0)
c->modrm_ea += insn_fetch(s32, 4, c->eip);
else
c->modrm_ea += c->regs[base_reg];
}
switch (index_reg) {
case 4:
break;
default:
if (index_reg != 4)
c->modrm_ea += c->regs[index_reg] << scale;
}
break;
case 5:
case 13:
Expand Down

0 comments on commit d6b5ce4

Please sign in to comment.