qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 15/20] target/arm: Convert TBZ, TBNZ to decodetree


From: Richard Henderson
Subject: Re: [PATCH 15/20] target/arm: Convert TBZ, TBNZ to decodetree
Date: Sat, 13 May 2023 08:28:16 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0

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 via email to

[Prev in Thread] Current Thread [Next in Thread]