On Sat, Jan 12, 2013 at 04:32:50PM +0200, Avi Kivity wrote:
> Signed-off-by: Avi Kivity <[email protected]>
> ---
> arch/x86/kvm/emulate.c | 33 +++++++++++++++++++++------------
> 1 file changed, 21 insertions(+), 12 deletions(-)
>
> diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
> index 619a33d..2189c6a 100644
> --- a/arch/x86/kvm/emulate.c
> +++ b/arch/x86/kvm/emulate.c
> @@ -454,6 +454,8 @@ static void invalidate_registers(struct x86_emulate_ctxt
> *ctxt)
> #define FOP_END \
> ".popsection")
>
> +#define FOPNOP() FOP_ALIGN FOP_RET
> +
> #define FOP1E(op, dst) \
> FOP_ALIGN #op " %" #dst " \n\t" FOP_RET
>
> @@ -476,6 +478,18 @@ static void invalidate_registers(struct x86_emulate_ctxt
> *ctxt)
> ON64(FOP2E(op##q, rax, rbx)) \
> FOP_END
>
> +#define FOP3E(op, dst, src, src2) \
> + FOP_ALIGN #op " %" #src2 ", %" #src ", %" #dst " \n\t" FOP_RET
> +
> +/* 3-operand, word-only, src2=cl */
> +#define FASTOP3WCL(op) \
> + FOP_START(op) \
> + FOPNOP() \
> + FOP3E(op, ax, bx, cl) \
> + FOP3E(op, eax, ebx, cl) \
> + ON64(FOP3E(op, rax, rbx, cl)) \
All other FASTOPs have explicit operand size. It is not strictly required
since assembler can figure it out from register name, but for consistency
why not put it there too?
--
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