On Tue, Mar 15, 2011 at 06:32:32AM +0900, Takuya Yoshikawa wrote:
> On Mon, 14 Mar 2011 17:11:40 +0200
> Gleb Natapov <[email protected]> wrote:
>
> > > @@ -3212,11 +3235,13 @@ special_insn:
> > > break;
> > > case 0xa6 ... 0xa7: /* cmps */
> > > c->dst.type = OP_NONE; /* Disable writeback. */
> > > - goto cmp;
> > > + emulate_2op_SrcV("cmp", c->src, c->dst, ctxt->eflags);
> > Why not call em_cmp() here?
>
> I thought that I needed to check of
> c->dst.type = OP_NONE; /* Disable writeback. */
> later.
>
I mean call em_cmp() after c->dst.type = OP_NONE line, not replacing it.
> So I just decided to treat CMPS and SCAS in another patch.
> I mean I may introduce em_cmps or em_scas later if needed.
>
scas will likely just call em_cmp.
> You prefer to treat these in this patch?
>
If there will be other patch for those instruction then it may be left
as is.
> > > + break;
> > > case 0xa8 ... 0xa9: /* test ax, imm */
> > > goto test;
> > > case 0xae ... 0xaf: /* scas */
> > > - goto cmp;
> > > + emulate_2op_SrcV("cmp", c->src, c->dst, ctxt->eflags);
> > And here?
>
> What is the difference of CMPS and SCAS?
>
>
One compares to memory locations and another memory with AX register.
--
Gleb.
--
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