[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 04/12] target/rx: Use generic hrev32_i32() in REVW opcode
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 04/12] target/rx: Use generic hrev32_i32() in REVW opcode |
Date: |
Tue, 22 Aug 2023 14:40:34 +0200 |
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/rx/translate.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/target/rx/translate.c b/target/rx/translate.c
index f552a0319a..75590ae05e 100644
--- a/target/rx/translate.c
+++ b/target/rx/translate.c
@@ -1513,13 +1513,7 @@ static bool trans_REVL(DisasContext *ctx, arg_REVL *a)
/* revw rs, rd */
static bool trans_REVW(DisasContext *ctx, arg_REVW *a)
{
- TCGv tmp;
- tmp = tcg_temp_new();
- tcg_gen_andi_i32(tmp, cpu_regs[a->rs], 0x00ff00ff);
- tcg_gen_shli_i32(tmp, tmp, 8);
- tcg_gen_shri_i32(cpu_regs[a->rd], cpu_regs[a->rs], 8);
- tcg_gen_andi_i32(cpu_regs[a->rd], cpu_regs[a->rd], 0x00ff00ff);
- tcg_gen_or_i32(cpu_regs[a->rd], cpu_regs[a->rd], tmp);
+ tcg_gen_hrev32_i32(cpu_regs[a->rd], cpu_regs[a->rs]);
return true;
}
--
2.41.0
- [PATCH 00/12] tcg: Factor hrev{32,64}_{i32,i64,tl} out, Philippe Mathieu-Daudé, 2023/08/22
- [PATCH 01/12] tcg/tcg-op: Factor tcg_gen_hrev32_i32() out, Philippe Mathieu-Daudé, 2023/08/22
- [PATCH 02/12] target/arm: Use generic hrev32_i32() in ARM REV16 and VREV16 opcodes, Philippe Mathieu-Daudé, 2023/08/22
- [PATCH 03/12] target/cris: Use generic hrev32_i32() in SWAPB opcode, Philippe Mathieu-Daudé, 2023/08/22
- [PATCH 04/12] target/rx: Use generic hrev32_i32() in REVW opcode,
Philippe Mathieu-Daudé <=
- [PATCH 05/12] tcg/tcg-op: Factor tcg_gen_hrev64_i64() out, Philippe Mathieu-Daudé, 2023/08/22
- [PATCH 10/12] target/arm: Use generic hrev_i64() in Aarch64 REV16 opcode, Philippe Mathieu-Daudé, 2023/08/22
- [PATCH 09/12] tcg/tcg-op: Add tcg_gen_hrev32_i64() and tcg_gen_hrev_i64(), Philippe Mathieu-Daudé, 2023/08/22
- [PATCH 08/12] target/loongarch: Use generic hrev64_i64() in REVB.4H opcode, Philippe Mathieu-Daudé, 2023/08/22
- [PATCH 11/12] target/loongarch: Use generic hrev64_i32() in REVB.2H opcode, Philippe Mathieu-Daudé, 2023/08/22