Re: [PATCH] x86 emulator: Add Src2 decode set

Guillaume Thouvenin
2008-10-09T09:30:51Z

On Thu, 09 Oct 2008 11:06:50 +0200
Avi Kivity <avi@redhat.com> wrote:

>
> The regular shift instructions (shl, rcl, etc) come in three varieties:
> shift by 1, shift by imm8, and shift by CL. Right now they use
> SrcImmByte and decode the implied '1' and CL by hand. If we change them
> to use Src2, they can reuse the Src2CL and Src2One support that you are
> adding now.

Ok I see but shld, rcld, etc come only in two varieties: immediate and
CL. So maybe it could be better to replace SrcImplicit (that is not
really useful) by SrcOne? and then we will have

...
case SrcOne:
c->src.val = 1;
break;
...

and we can reuse Src2CL as well.