[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 6/9] target/xtensa: Use tcg_gen_extract_i32
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 6/9] target/xtensa: Use tcg_gen_extract_i32 |
Date: |
Mon, 23 Oct 2023 18:09:41 +0200 |
Inspired-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
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
- Re: [PATCH 1/9] target/avr: Use tcg_gen_extract_tl, (continued)
- [PATCH 2/9] target/cris: Use tcg_gen_extract_tl, Philippe Mathieu-Daudé, 2023/10/23
- [PATCH 3/9] target/mips: Use tcg_gen_extract_i32, Philippe Mathieu-Daudé, 2023/10/23
- [PATCH 4/9] target/ppc: Use tcg_gen_extract_i32, Philippe Mathieu-Daudé, 2023/10/23
- [PATCH 5/9] target/sparc: Use tcg_gen_extract_tl, Philippe Mathieu-Daudé, 2023/10/23
- [PATCH 6/9] target/xtensa: Use tcg_gen_extract_i32,
Philippe Mathieu-Daudé <=
- [PATCH 7/9] target/mips: Use tcg_gen_sextract_tl, Philippe Mathieu-Daudé, 2023/10/23
- [RFC PATCH 8/9] target/cris: Use tcg_gen_sextract_tl, Philippe Mathieu-Daudé, 2023/10/23