On Tue, 24 Apr 2012 17:10:08 +0300
Avi Kivity <[email protected]> wrote:
> > + if (!modrm_fetched && (ctxt->d & ModRM))
> > + ctxt->modrm = insn_fetch(u8, ctxt);
>
> Instead of adding yet another conditional, how about doing something like
>
> if ((c->d & ModRM) || (gtype == Group) || (gtype == GroupDual))
> ctxt->modrm = insn_fetch(u8, ctxt);
>
> somewhere early?
Looks nicer than mine.
> In fact even that is too much. All groups have ModRM somewhere in their
> encoding; all we have to do is move it to the main tables (opcode_table
> or twobyte_table) and just move the existing modrm fetch before group
> parsing.
I see.
Then, the best way to go seems to be drop patch-4 and work on the ModRM
fetch issue separately.
Modifying the tables needs some care.
Thanks,
Takuya
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html