All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	qemu-arm@nongnu.org, david@redhat.com
Subject: Re: [Qemu-devel] [Qemu-arm] [PATCH 9/9] target/arm: Simplify BFXIL expansion
Date: Sat, 9 Mar 2019 01:45:34 +0100	[thread overview]
Message-ID: <906cb044-a5ef-21a2-3ccc-2b7492c2301c@amsat.org> (raw)
In-Reply-To: <20190307144126.31847-10-richard.henderson@linaro.org>

On 3/7/19 3:41 PM, Richard Henderson wrote:
> The mask implied by the extract is redundant with the one
> implied by the deposit.  Also, fix spelling of BFXIL.

This spelling fix also help understanding the context!

> 
> Cc: qemu-arm@nongnu.org 
> Cc: Peter Maydell <peter.maydell@linaro.org> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  target/arm/translate-a64.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
> index 54fe94c436..39e0512d21 100644
> --- a/target/arm/translate-a64.c
> +++ b/target/arm/translate-a64.c
> @@ -4043,8 +4043,8 @@ static void disas_bitfield(DisasContext *s, uint32_t insn)
>              tcg_gen_extract_i64(tcg_rd, tcg_tmp, ri, len);
>              return;
>          }
> -        /* opc == 1, BXFIL fall through to deposit */
> -        tcg_gen_extract_i64(tcg_tmp, tcg_tmp, ri, len);
> +        /* opc == 1, BFXIL fall through to deposit */
> +        tcg_gen_shri_i64(tcg_tmp, tcg_tmp, ri);
>          pos = 0;
>      } else {
>          /* Handle the ri > si case with a deposit
> @@ -4062,7 +4062,7 @@ static void disas_bitfield(DisasContext *s, uint32_t insn)
>          len = ri;
>      }
>  
> -    if (opc == 1) { /* BFM, BXFIL */
> +    if (opc == 1) { /* BFM, BFXIL */
>          tcg_gen_deposit_i64(tcg_rd, tcg_rd, tcg_tmp, pos, len);

Fall through and use deposit of len indeed. So the previous SHRI is enough.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

This function uses hardcore optimizations btw, un chef d'oeuvre :)

>      } else {
>          /* SBFM or UBFM: We start with zero, and we haven't modified
> 

  reply	other threads:[~2019-03-09  0:45 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-07 14:41 [Qemu-devel] [PATCH 0/9] tcg: Add tcg_gen_extract2_{i32,i64} Richard Henderson
2019-03-07 14:41 ` [Qemu-devel] [PATCH 1/9] tcg: Implement tcg_gen_extract2_{i32, i64} Richard Henderson
2019-03-08 23:19   ` Philippe Mathieu-Daudé
2019-03-07 14:41 ` [Qemu-devel] [PATCH 2/9] tcg: Add INDEX_op_extract2_{i32,i64} Richard Henderson
2019-03-07 15:19   ` David Hildenbrand
2019-03-08 23:28   ` Philippe Mathieu-Daudé
2019-03-09 16:37     ` Richard Henderson
     [not found]   ` <CAFEAcA8JwtiBSgUg_8kg52GETGd3vbX86nvziXa6ZyvqDPLt5g@mail.gmail.com>
2019-04-03 11:37     ` Richard Henderson
2019-04-03 11:56       ` Peter Maydell
2019-04-13  8:31         ` Richard Henderson
2019-03-07 14:41 ` [Qemu-devel] [PATCH 3/9] tcg: Use extract2 in tcg_gen_shifti_i64 Richard Henderson
2019-03-09  1:00   ` Philippe Mathieu-Daudé
2019-03-09 20:30   ` Aleksandar Markovic
2019-03-10  6:43     ` Richard Henderson
2019-03-07 14:41 ` [Qemu-devel] [PATCH 4/9] tcg: Use extract2 in tcg_gen_deposit_{i32, i64} Richard Henderson
2019-03-09  0:36   ` Philippe Mathieu-Daudé
2019-03-07 14:41 ` [Qemu-devel] [PATCH 5/9] tcg/i386: Support INDEX_op_extract2_{i32, i64} Richard Henderson
2019-03-07 14:41 ` [Qemu-devel] [PATCH 6/9] tcg/arm: Support INDEX_op_extract2_i32 Richard Henderson
2019-03-09  0:11   ` Philippe Mathieu-Daudé
2019-03-07 14:41 ` [Qemu-devel] [PATCH 7/9] tcg/aarch64: Support INDEX_op_extract2_{i32, i64} Richard Henderson
2019-03-08 23:41   ` Philippe Mathieu-Daudé
2019-03-07 14:41 ` [Qemu-devel] [PATCH 8/9] target/arm: Use extract2 for EXTR Richard Henderson
2019-03-07 14:41 ` [Qemu-devel] [PATCH 9/9] target/arm: Simplify BFXIL expansion Richard Henderson
2019-03-09  0:45   ` Philippe Mathieu-Daudé [this message]
2019-03-07 15:23 ` [Qemu-devel] [PATCH 0/9] tcg: Add tcg_gen_extract2_{i32,i64} no-reply
2019-03-07 15:47 ` no-reply
2019-03-08 23:23 ` no-reply
2019-03-08 23:45 ` no-reply
2019-03-09  0:16 ` no-reply
2019-03-09  0:49 ` no-reply
2019-04-09 18:53 ` David Hildenbrand
2019-04-09 19:02   ` Richard Henderson
2019-04-09 19:05     ` David Hildenbrand

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=906cb044-a5ef-21a2-3ccc-2b7492c2301c@amsat.org \
    --to=f4bug@amsat.org \
    --cc=david@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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 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.