[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 19/29] target/arm: Delete dead code from disas_simd_indexed
From: |
Peter Maydell |
Subject: |
[PULL 19/29] target/arm: Delete dead code from disas_simd_indexed |
Date: |
Mon, 1 Jul 2024 17:07:19 +0100 |
From: Richard Henderson <richard.henderson@linaro.org>
MLA, MLS, SQDMULH, SQRDMULH, were converted with 8db93dcd3def
and f80701cb44d, and this code should have been removed then.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20240625183536.1672454-14-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/tcg/translate-a64.c | 93 ----------------------------------
1 file changed, 93 deletions(-)
diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c
index 161fa2659c4..6c07aeaf3bd 100644
--- a/target/arm/tcg/translate-a64.c
+++ b/target/arm/tcg/translate-a64.c
@@ -11976,7 +11976,6 @@ static void disas_simd_indexed(DisasContext *s,
uint32_t insn)
int h = extract32(insn, 11, 1);
int rn = extract32(insn, 5, 5);
int rd = extract32(insn, 0, 5);
- bool is_long = false;
int index;
switch (16 * u + opcode) {
@@ -11990,12 +11989,10 @@ static void disas_simd_indexed(DisasContext *s,
uint32_t insn)
unallocated_encoding(s);
return;
}
- is_long = true;
break;
case 0x03: /* SQDMLAL, SQDMLAL2 */
case 0x07: /* SQDMLSL, SQDMLSL2 */
case 0x0b: /* SQDMULL, SQDMULL2 */
- is_long = true;
break;
default:
case 0x00: /* FMLAL */
@@ -12047,96 +12044,6 @@ static void disas_simd_indexed(DisasContext *s,
uint32_t insn)
if (size == 3) {
g_assert_not_reached();
- } else if (!is_long) {
- /* 32 bit floating point, or 16 or 32 bit integer.
- * For the 16 bit scalar case we use the usual Neon helpers and
- * rely on the fact that 0 op 0 == 0 with no side effects.
- */
- TCGv_i32 tcg_idx = tcg_temp_new_i32();
- int pass, maxpasses;
-
- if (is_scalar) {
- maxpasses = 1;
- } else {
- maxpasses = is_q ? 4 : 2;
- }
-
- read_vec_element_i32(s, tcg_idx, rm, index, size);
-
- if (size == 1 && !is_scalar) {
- /* The simplest way to handle the 16x16 indexed ops is to duplicate
- * the index into both halves of the 32 bit tcg_idx and then use
- * the usual Neon helpers.
- */
- tcg_gen_deposit_i32(tcg_idx, tcg_idx, tcg_idx, 16, 16);
- }
-
- for (pass = 0; pass < maxpasses; pass++) {
- TCGv_i32 tcg_op = tcg_temp_new_i32();
- TCGv_i32 tcg_res = tcg_temp_new_i32();
-
- read_vec_element_i32(s, tcg_op, rn, pass, is_scalar ? size :
MO_32);
-
- switch (16 * u + opcode) {
- case 0x10: /* MLA */
- case 0x14: /* MLS */
- {
- static NeonGenTwoOpFn * const fns[2][2] = {
- { gen_helper_neon_add_u16, gen_helper_neon_sub_u16 },
- { tcg_gen_add_i32, tcg_gen_sub_i32 },
- };
- NeonGenTwoOpFn *genfn;
- bool is_sub = opcode == 0x4;
-
- if (size == 1) {
- gen_helper_neon_mul_u16(tcg_res, tcg_op, tcg_idx);
- } else {
- tcg_gen_mul_i32(tcg_res, tcg_op, tcg_idx);
- }
- if (opcode == 0x8) {
- break;
- }
- read_vec_element_i32(s, tcg_op, rd, pass, MO_32);
- genfn = fns[size - 1][is_sub];
- genfn(tcg_res, tcg_op, tcg_res);
- break;
- }
- case 0x0c: /* SQDMULH */
- if (size == 1) {
- gen_helper_neon_qdmulh_s16(tcg_res, tcg_env,
- tcg_op, tcg_idx);
- } else {
- gen_helper_neon_qdmulh_s32(tcg_res, tcg_env,
- tcg_op, tcg_idx);
- }
- break;
- case 0x0d: /* SQRDMULH */
- if (size == 1) {
- gen_helper_neon_qrdmulh_s16(tcg_res, tcg_env,
- tcg_op, tcg_idx);
- } else {
- gen_helper_neon_qrdmulh_s32(tcg_res, tcg_env,
- tcg_op, tcg_idx);
- }
- break;
- default:
- case 0x01: /* FMLA */
- case 0x05: /* FMLS */
- case 0x09: /* FMUL */
- case 0x19: /* FMULX */
- case 0x1d: /* SQRDMLAH */
- case 0x1f: /* SQRDMLSH */
- g_assert_not_reached();
- }
-
- if (is_scalar) {
- write_fp_sreg(s, rd, tcg_res);
- } else {
- write_vec_element_i32(s, tcg_res, rd, pass, MO_32);
- }
- }
-
- clear_vec_high(s, is_q, rd);
} else {
/* long ops: 16x16->32 or 32x32->64 */
TCGv_i64 tcg_res[2];
--
2.34.1
- [PULL 04/29] tests/avocado: update firmware for sbsa-ref, (continued)
- [PULL 04/29] tests/avocado: update firmware for sbsa-ref, Peter Maydell, 2024/07/01
- [PULL 02/29] hw/arm: Connect OTP device to BCM2835, Peter Maydell, 2024/07/01
- [PULL 08/29] target/arm: Fix SQDMULH (by element) with Q=0, Peter Maydell, 2024/07/01
- [PULL 14/29] target/arm: Convert BFMLALB, BFMLALT to decodetree, Peter Maydell, 2024/07/01
- [PULL 06/29] hw/arm/smmu-common: Replace smmu_iommu_mr with smmu_find_sdev, Peter Maydell, 2024/07/01
- [PULL 21/29] target/arm: Move initialization of debug ID registers, Peter Maydell, 2024/07/01
- [PULL 11/29] target/arm: Convert SDOT, UDOT to decodetree, Peter Maydell, 2024/07/01
- [PULL 09/29] target/arm: Fix FJCVTZS vs flush-to-zero, Peter Maydell, 2024/07/01
- [PULL 16/29] target/arm: Add data argument to do_fp3_vector, Peter Maydell, 2024/07/01
- [PULL 22/29] target/arm: Enable FEAT_Debugv8p8 for -cpu max, Peter Maydell, 2024/07/01
- [PULL 19/29] target/arm: Delete dead code from disas_simd_indexed,
Peter Maydell <=
- [PULL 24/29] hw/misc/zynq_slcr: Add boot-mode property, Peter Maydell, 2024/07/01
- [PULL 25/29] hw/arm/xilinx_zynq: Add boot-mode property, Peter Maydell, 2024/07/01
- [PULL 28/29] hw/misc: In STM32L4x5 EXTI, correct configurable interrupts, Peter Maydell, 2024/07/01
- [PULL 12/29] target/arm: Convert SUDOT, USDOT to decodetree, Peter Maydell, 2024/07/01
- [PULL 13/29] target/arm: Convert BFDOT to decodetree, Peter Maydell, 2024/07/01
- [PULL 17/29] target/arm: Convert FCADD to decodetree, Peter Maydell, 2024/07/01
- [PULL 15/29] target/arm: Convert BFMMLA, SMMLA, UMMLA, USMMLA to decodetree, Peter Maydell, 2024/07/01
- [PULL 23/29] MAINTAINERS: Update my family name, Peter Maydell, 2024/07/01
- [PULL 20/29] target/arm: Fix indentation, Peter Maydell, 2024/07/01
- [PULL 27/29] tests/qtest: Fix STM32L4x5 SYSCFG irq line 15 state assumption, Peter Maydell, 2024/07/01