qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>,
	qemu-arm@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH 03/10] target/arm: Convert Neon 2-reg-scalar integer multiplies to decodetree
Date: Thu, 11 Jun 2020 09:09:11 -0700	[thread overview]
Message-ID: <9e1c9363-2c6e-dd3b-3e2c-c28b9bd42c54@linaro.org> (raw)
In-Reply-To: <20200611144529.8873-4-peter.maydell@linaro.org>

On 6/11/20 7:45 AM, Peter Maydell wrote:
> Convert the VMLA, VMLS and VMUL insns in the Neon "2 registers and a
> scalar" group to decodetree.  These are 32x32->32 operations where
> one of the inputs is the scalar, followed by a possible accumulate
> operation of the 32-bit result.
> 
> The refactoring removes some of the oddities of the old decoder:
>  * operands to the operation and accumulation were often
>    reversed (taking advantage of the fact that most of these ops
>    are commutative); the new code follows the pseudocode order
>  * the Q bit in the insn was in a local variable 'u'; in the
>    new code it is decoded into a->q
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


> +static void gen_neon_dup_low16(TCGv_i32 var)
> +{
> +    TCGv_i32 tmp = tcg_temp_new_i32();
> +    tcg_gen_ext16u_i32(var, var);
> +    tcg_gen_shli_i32(tmp, var, 16);
> +    tcg_gen_or_i32(var, var, tmp);
> +    tcg_temp_free_i32(tmp);
> +}
> +
> +static void gen_neon_dup_high16(TCGv_i32 var)
> +{
> +    TCGv_i32 tmp = tcg_temp_new_i32();
> +    tcg_gen_andi_i32(var, var, 0xffff0000);
> +    tcg_gen_shri_i32(tmp, var, 16);
> +    tcg_gen_or_i32(var, var, tmp);
> +    tcg_temp_free_i32(tmp);
> +}

I was going to quibble about this implementation, but see that it's a straight
move from translate.c.

The real TODO should be a conversion to tcg_gen_gvec_2s(), so that we use real
vector multiplies and adds here, with the scalar duped across the vector, not
just an i32.


r~


  reply	other threads:[~2020-06-11 16:14 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11 14:45 [PATCH 00/10] target/arm: Convert 2-reg-scalar to decodetree Peter Maydell
2020-06-11 14:45 ` [PATCH 01/10] target/arm: Add 'static' and 'const' annotations to VSHLL function arrays Peter Maydell
2020-06-11 15:41   ` Richard Henderson
2020-06-11 14:45 ` [PATCH 02/10] target/arm: Add missing TCG temp free in do_2shift_env_64() Peter Maydell
2020-06-11 15:43   ` Richard Henderson
2020-06-11 17:05     ` Peter Maydell
2020-06-11 14:45 ` [PATCH 03/10] target/arm: Convert Neon 2-reg-scalar integer multiplies to decodetree Peter Maydell
2020-06-11 16:09   ` Richard Henderson [this message]
2020-06-11 14:45 ` [PATCH 04/10] target/arm: Convert Neon 2-reg-scalar float " Peter Maydell
2020-06-11 16:14   ` Richard Henderson
2020-06-11 14:45 ` [PATCH 05/10] target/arm: Convert Neon 2-reg-scalar VQDMULH, VQRDMULH " Peter Maydell
2020-06-11 16:15   ` Richard Henderson
2020-06-11 14:45 ` [PATCH 06/10] target/arm: Convert Neon 2-reg-scalar VQRDMLAH, VQRDMLSH " Peter Maydell
2020-06-11 16:19   ` Richard Henderson
2020-06-11 14:45 ` [PATCH 07/10] target/arm: Convert Neon 2-reg-scalar long multiplies " Peter Maydell
2020-06-11 16:25   ` Richard Henderson
2020-06-11 14:45 ` [PATCH 08/10] target/arm: Convert Neon VEXT " Peter Maydell
2020-06-11 16:26   ` Richard Henderson
2020-06-11 14:45 ` [PATCH 09/10] target/arm: Convert Neon VTBL, VTBX " Peter Maydell
2020-06-11 16:43   ` Richard Henderson
2020-06-11 16:45   ` Richard Henderson
2020-06-11 14:45 ` [PATCH 10/10] target/arm: Convert Neon VDUP (scalar) " Peter Maydell
2020-06-11 16:48   ` Richard Henderson
2020-06-11 23:16 ` [PATCH 00/10] target/arm: Convert 2-reg-scalar " no-reply
2020-06-11 23:42 ` no-reply

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=9e1c9363-2c6e-dd3b-3e2c-c28b9bd42c54@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).