[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 7/9] target/xtensa: Use tcg_gen_extract_i32
|
From: |
Philippe Mathieu-Daudé |
|
Subject: |
[PATCH v2 7/9] target/xtensa: Use tcg_gen_extract_i32 |
|
Date: |
Tue, 24 Oct 2023 18:59:00 +0200 |
Inspired-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Max Filippov <jcmvbkbc@gmail.com>
---
target/xtensa/translate.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c
index de89940599..cbc564c020 100644
--- a/target/xtensa/translate.c
+++ b/target/xtensa/translate.c
@@ -1595,11 +1595,7 @@ static void translate_entry(DisasContext *dc, const
OpcodeArg arg[],
static void translate_extui(DisasContext *dc, const OpcodeArg arg[],
const uint32_t par[])
{
- int maskimm = (1 << arg[3].imm) - 1;
-
- TCGv_i32 tmp = tcg_temp_new_i32();
- tcg_gen_shri_i32(tmp, arg[1].in, arg[2].imm);
- tcg_gen_andi_i32(arg[0].out, tmp, maskimm);
+ tcg_gen_extract_i32(arg[0].out, arg[1].in, arg[2].imm, arg[3].imm);
}
static void translate_getex(DisasContext *dc, const OpcodeArg arg[],
--
2.41.0
- [PATCH v2 0/9] tcg: Use tcg_gen_[s]extract_{i32,i64,tl}, Philippe Mathieu-Daudé, 2023/10/24
- [PATCH v2 1/9] target/avr: Use tcg_gen_extract_tl, Philippe Mathieu-Daudé, 2023/10/24
- [PATCH v2 2/9] target/cris: Use tcg_gen_extract_tl, Philippe Mathieu-Daudé, 2023/10/24
- [PATCH v2 3/9] target/i386: Use tcg_gen_extract_tl, Philippe Mathieu-Daudé, 2023/10/24
- [PATCH v2 4/9] target/mips: Use tcg_gen_extract_i32, Philippe Mathieu-Daudé, 2023/10/24
- [PATCH v2 5/9] target/ppc: Use tcg_gen_extract_i32, Philippe Mathieu-Daudé, 2023/10/24
- [PATCH v2 6/9] target/sparc: Use tcg_gen_extract_tl, Philippe Mathieu-Daudé, 2023/10/24
- [PATCH v2 7/9] target/xtensa: Use tcg_gen_extract_i32,
Philippe Mathieu-Daudé <=
- [PATCH v2 8/9] target/mips: Use tcg_gen_ext16s_tl, Philippe Mathieu-Daudé, 2023/10/24
- [PATCH v2 9/9] target/mips: Use tcg_gen_ext*u_tl, Philippe Mathieu-Daudé, 2023/10/24