Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215621
b: refs/heads/master
c: 52811d7
h: refs/heads/master
i:
  215619: d4ff300
v: v3
  • Loading branch information
Avi Kivity committed Oct 24, 2010
1 parent cb02ce9 commit 24e5a70
Show file tree
Hide file tree
Showing 2 changed files with 7 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: 047a4818094217a1323d8f31f9318ea2e142f745
refs/heads/master: 52811d7de565b2db988257591fbf2a6be31c1459
10 changes: 6 additions & 4 deletions trunk/arch/x86/kvm/emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@ x86_decode_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
struct decode_cache *c = &ctxt->decode;
int rc = X86EMUL_CONTINUE;
int mode = ctxt->mode;
int def_op_bytes, def_ad_bytes, group;
int def_op_bytes, def_ad_bytes, group, dual;


/* we cannot decode insn before we complete previous rep insn */
Expand Down Expand Up @@ -1055,14 +1055,16 @@ x86_decode_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)

if (c->d & Group) {
group = c->d & GroupMask;
dual = c->d & GroupDual;
c->modrm = insn_fetch(u8, 1, c->eip);
--c->eip;

group = (group << 3) + ((c->modrm >> 3) & 7);
if ((c->d & GroupDual) && (c->modrm >> 6) == 3)
c->d = group2_table[group];
c->d &= ~(Group | GroupDual | GroupMask);
if (dual && (c->modrm >> 6) == 3)
c->d |= group2_table[group];
else
c->d = group_table[group];
c->d |= group_table[group];
}

/* Unrecognised? */
Expand Down

0 comments on commit 24e5a70

Please sign in to comment.