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

Avi Kivity
2008-10-09T09:07:26Z

Guillaume Thouvenin wrote:
> I will add Src2One but I don't understand exactly what you mean by
> switching shift operators to Src2 later. I also applied other remarks,
> thanks for your help. The patch follows.
>

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.

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.