All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Avi Kivity <avi.kivity@gmail.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH 1/8] KVM: x86 emulator: Streamline SHLD, SHRD
Date: Thu, 17 Jan 2013 10:45:18 +0200	[thread overview]
Message-ID: <20130117084518.GF11529@redhat.com> (raw)
In-Reply-To: <1358001177-8952-2-git-send-email-avi.kivity@gmail.com>

On Sat, Jan 12, 2013 at 04:32:50PM +0200, Avi Kivity wrote:
> Signed-off-by: Avi Kivity <avi.kivity@gmail.com>
> ---
>  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.

  reply	other threads:[~2013-01-17  8:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-12 14:32 [PATCH 0/8] More fastop patches Avi Kivity
2013-01-12 14:32 ` [PATCH 1/8] KVM: x86 emulator: Streamline SHLD, SHRD Avi Kivity
2013-01-17  8:45   ` Gleb Natapov [this message]
2013-01-12 14:32 ` [PATCH 2/8] KVM: x86 emulator: convert shift/rotate instructions to fastop Avi Kivity
2013-01-12 14:32 ` [PATCH 3/8] KVM: x86 emulator: covert SETCC " Avi Kivity
2013-01-17  9:42   ` Gleb Natapov
2013-01-12 14:32 ` [PATCH 4/8] KVM: x86 emulator: convert INC/DEC " Avi Kivity
2013-01-12 14:32 ` [PATCH 5/8] KVM: x86 emulator: convert BT/BTS/BTR/BTC/BSF/BSR " Avi Kivity
2013-01-12 14:32 ` [PATCH 6/8] KVM: x86 emulator: convert 2-operand IMUL " Avi Kivity
2013-01-12 14:32 ` [PATCH 7/8] KVM: x86 emulator: rearrange fastop definitions Avi Kivity
2013-01-12 14:32 ` [PATCH 8/8] KVM: x86 emulator: convert a few freestanding emulations to fastop Avi Kivity
2013-01-17  9:44   ` Gleb Natapov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130117084518.GF11529@redhat.com \
    --to=gleb@redhat.com \
    --cc=avi.kivity@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.