[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 10/12] target/arm: Use generic hrev_i64() in Aarch64 REV16 opcode
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 10/12] target/arm: Use generic hrev_i64() in Aarch64 REV16 opcode |
Date: |
Tue, 22 Aug 2023 14:46:18 +0200 |
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/arm/tcg/translate-a64.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c
index 5fa1257d32..2973831b38 100644
--- a/target/arm/tcg/translate-a64.c
+++ b/target/arm/tcg/translate-a64.c
@@ -5040,16 +5040,7 @@ static void handle_rev32(DisasContext *s, unsigned int
sf,
static void handle_rev16(DisasContext *s, unsigned int sf,
unsigned int rn, unsigned int rd)
{
- TCGv_i64 tcg_rd = cpu_reg(s, rd);
- TCGv_i64 tcg_tmp = tcg_temp_new_i64();
- TCGv_i64 tcg_rn = read_cpu_reg(s, rn, sf);
- TCGv_i64 mask = tcg_constant_i64(sf ? 0x00ff00ff00ff00ffull : 0x00ff00ff);
-
- tcg_gen_shri_i64(tcg_tmp, tcg_rn, 8);
- tcg_gen_and_i64(tcg_rd, tcg_rn, mask);
- tcg_gen_and_i64(tcg_tmp, tcg_tmp, mask);
- tcg_gen_shli_i64(tcg_rd, tcg_rd, 8);
- tcg_gen_or_i64(tcg_rd, tcg_rd, tcg_tmp);
+ tcg_gen_hrev_i64(cpu_reg(s, rd), read_cpu_reg(s, rn, sf), sf);
}
/* Data-processing (1 source)
--
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é, 2023/08/22
- [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é <=
- [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
- [PATCH 07/12] target/ppc: Use generic hrev64_i64() in BRH / BSWAP16x8 opcodes, Philippe Mathieu-Daudé, 2023/08/22