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 15/20] target/arm: Convert TBZ, TBNZ to decodetree
Date: Sat, 13 May 2023 08:28:16 +0100	[thread overview]
Message-ID: <2fc18b8c-26e6-e65c-4cc2-937b4e6715b9@linaro.org> (raw)
In-Reply-To: <20230512144106.3608981-16-peter.maydell@linaro.org>

On 5/12/23 15:41, Peter Maydell wrote:
> Convert the test-and-branch-immediate insns TBZ and TBNZ
> to decodetree.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>   target/arm/tcg/a64.decode      |  7 +++++++
>   target/arm/tcg/translate-a64.c | 25 +++++--------------------
>   2 files changed, 12 insertions(+), 20 deletions(-)
> 
> diff --git a/target/arm/tcg/a64.decode b/target/arm/tcg/a64.decode
> index 86220569e13..68dc820ece0 100644
> --- a/target/arm/tcg/a64.decode
> +++ b/target/arm/tcg/a64.decode
> @@ -121,3 +121,10 @@ BL              1 00101 .......................... @branch
>   @cbz            sf:1 ...... nz:1 ................... rt:5 &cbz imm=%imm19
>   
>   CBZ             . 011010 . ................... ..... @cbz
> +
> +%imm14     5:s14 !function=times_4
> +%imm31_19  31:1 19:5
> +&tbz       rt imm nz bitpos
> +@tbz            . ...... nz:1 ..... .............. rt:5 &tbz  imm=%imm14 bitpos=%imm31_19
> +
> +TBZ             . 011011 . ..... .............. ..... @tbz

Similarly with the single-use @format.

> -    tcg_gen_andi_i64(tcg_cmp, cpu_reg(s, rt), (1ULL << bit_pos));
> +    tcg_gen_andi_i64(tcg_cmp, cpu_reg(s, a->rt), (1ULL << a->bitpos));

Can we drop the () around the bit, or use BIT()?.

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

r~



  reply	other threads:[~2023-05-13  7:28 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-12 14:40 [PATCH 00/20] target/arm: Start conversion of A64 decoder to decodetree Peter Maydell
2023-05-12 14:40 ` [PATCH 01/20] target/arm: Split out disas_a64_legacy Peter Maydell
2023-05-12 14:40 ` [PATCH 02/20] target/arm: Create decodetree skeleton for A64 Peter Maydell
2023-05-13  7:12   ` Richard Henderson
2023-05-12 14:40 ` [PATCH 03/20] target/arm: Pull calls to disas_sve() and disas_sme() out of legacy decoder Peter Maydell
2023-05-13  7:13   ` Richard Henderson
2023-05-12 14:40 ` [PATCH 04/20] target/arm: Convert PC-rel addressing to decodetree Peter Maydell
2023-05-12 14:40 ` [PATCH 05/20] target/arm: Split gen_add_CC and gen_sub_CC Peter Maydell
2023-05-12 14:40 ` [PATCH 06/20] target/arm: Convert Add/subtract (immediate) to decodetree Peter Maydell
2023-05-12 14:40 ` [PATCH 07/20] target/arm: Convert Add/subtract (immediate with tags) " Peter Maydell
2023-05-12 14:40 ` [PATCH 08/20] target/arm: Replace bitmask64 with MAKE_64BIT_MASK Peter Maydell
2023-05-12 14:40 ` [PATCH 09/20] target/arm: Convert Logical (immediate) to decodetree Peter Maydell
2023-05-12 14:40 ` [PATCH 10/20] target/arm: Convert Move wide " Peter Maydell
2023-05-12 14:40 ` [PATCH 11/20] target/arm: Convert Bitfield " Peter Maydell
2023-05-12 14:40 ` [PATCH 12/20] target/arm: Convert Extract instructions " Peter Maydell
2023-05-13  7:18   ` Richard Henderson
2023-05-12 14:40 ` [PATCH 13/20] target/arm: Convert unconditional branch immediate " Peter Maydell
2023-05-13  7:19   ` Richard Henderson
2023-05-12 14:41 ` [PATCH 14/20] target/arm: Convert CBZ, CBNZ " Peter Maydell
2023-05-13  7:26   ` Richard Henderson
2023-05-12 14:41 ` [PATCH 15/20] target/arm: Convert TBZ, TBNZ " Peter Maydell
2023-05-13  7:28   ` Richard Henderson [this message]
2023-05-12 14:41 ` [PATCH 16/20] target/arm: Convert conditional branch insns " Peter Maydell
2023-05-13  7:28   ` Richard Henderson
2023-05-12 14:41 ` [PATCH 17/20] target/arm: Convert BR, BLR, RET " Peter Maydell
2023-05-13 11:26   ` Richard Henderson
2023-05-12 14:41 ` [PATCH 18/20] target/arm: Convert BRA[AB]Z, BLR[AB]Z, RETA[AB] " Peter Maydell
2023-05-13 11:32   ` Richard Henderson
2023-05-12 14:41 ` [PATCH 19/20] target/arm: Convert BRAA, BRAB, BLRAA, BLRAB " Peter Maydell
2023-05-13 11:34   ` Richard Henderson
2023-05-12 14:41 ` [PATCH 20/20] target/arm: Convert ERET, ERETAA, ERETAB " Peter Maydell
2023-05-13 11:39   ` Richard Henderson

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=2fc18b8c-26e6-e65c-4cc2-937b4e6715b9@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).