qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [PULL v2 10/12] target/arm: Use tcg_constant_i32() in gen_rev16()
Date: Tue,  2 Nov 2021 14:25:17 -0400	[thread overview]
Message-ID: <20211102182519.320319-11-richard.henderson@linaro.org> (raw)
In-Reply-To: <20211102182519.320319-1-richard.henderson@linaro.org>

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

Since the mask is a constant value, use tcg_constant_i32()
instead of a TCG temporary.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20211029231834.2476117-6-f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/arm/translate.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/target/arm/translate.c b/target/arm/translate.c
index 52ba562c96..98f5925928 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -388,13 +388,12 @@ static void gen_smul_dual(TCGv_i32 a, TCGv_i32 b)
 void gen_rev16(TCGv_i32 dest, TCGv_i32 var)
 {
     TCGv_i32 tmp = tcg_temp_new_i32();
-    TCGv_i32 mask = tcg_const_i32(0x00ff00ff);
+    TCGv_i32 mask = tcg_constant_i32(0x00ff00ff);
     tcg_gen_shri_i32(tmp, var, 8);
     tcg_gen_and_i32(tmp, tmp, mask);
     tcg_gen_and_i32(var, var, mask);
     tcg_gen_shli_i32(var, var, 8);
     tcg_gen_or_i32(dest, var, tmp);
-    tcg_temp_free_i32(mask);
     tcg_temp_free_i32(tmp);
 }
 
-- 
2.25.1



  parent reply	other threads:[~2021-11-02 18:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-02 18:25 [PULL v2 00/12] target/arm patch queue Richard Henderson
2021-11-02 18:25 ` [PULL v2 01/12] hw/sd: add nuvoton MMC Richard Henderson
2021-11-02 18:25 ` [PULL v2 02/12] hw/arm: Add Nuvoton SD module to board Richard Henderson
2021-11-02 18:25 ` [PULL v2 03/12] hw/arm: Attach MMC to quanta-gbs-bmc Richard Henderson
2021-11-02 18:25 ` [PULL v2 04/12] tests/qtest/libqos: add SDHCI commands Richard Henderson
2021-11-02 22:49   ` Hao Wu
2021-11-02 18:25 ` [PULL v2 05/12] target/arm: Advertise MVE to gdb when present Richard Henderson
2021-11-02 18:25 ` [PULL v2 06/12] target/arm: Use tcg_constant_i32() in op_smlad() Richard Henderson
2021-11-02 18:25 ` [PULL v2 07/12] target/arm: Introduce store_cpu_field_constant() helper Richard Henderson
2021-11-02 18:25 ` [PULL v2 08/12] target/arm: Use the constant variant of store_cpu_field() when possible Richard Henderson
2021-11-02 18:25 ` [PULL v2 09/12] target/arm: Use tcg_constant_i64() in do_sat_addsub_64() Richard Henderson
2021-11-02 18:25 ` Richard Henderson [this message]
2021-11-02 18:25 ` [PULL v2 11/12] hw/arm/virt: Rename default_bus_bypass_iommu Richard Henderson
2021-11-02 18:25 ` [PULL v2 12/12] hvf: arm: Ignore cache operations on MMIO Richard Henderson
2021-11-03 15:23 ` [PULL v2 00/12] target/arm patch queue 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=20211102182519.320319-11-richard.henderson@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=f4bug@amsat.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).