[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 10/26] target/arm: Simplify do_long_3d and do_2scalar_long
|
From: |
Peter Maydell |
|
Subject: |
[PULL 10/26] target/arm: Simplify do_long_3d and do_2scalar_long |
|
Date: |
Mon, 2 Nov 2020 17:09:49 +0000 |
From: Richard Henderson <richard.henderson@linaro.org>
In both cases, we can sink the write-back and perform
the accumulate into the normal destination temps.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20201030022618.785675-11-richard.henderson@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/translate-neon.c.inc | 23 +++++++++--------------
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/target/arm/translate-neon.c.inc b/target/arm/translate-neon.c.inc
index c2d67160f9e..1c16c56e7ec 100644
--- a/target/arm/translate-neon.c.inc
+++ b/target/arm/translate-neon.c.inc
@@ -2037,17 +2037,14 @@ static bool do_long_3d(DisasContext *s, arg_3diff *a,
if (accfn) {
tmp = tcg_temp_new_i64();
read_neon_element64(tmp, a->vd, 0, MO_64);
- accfn(tmp, tmp, rd0);
- write_neon_element64(tmp, a->vd, 0, MO_64);
+ accfn(rd0, tmp, rd0);
read_neon_element64(tmp, a->vd, 1, MO_64);
- accfn(tmp, tmp, rd1);
- write_neon_element64(tmp, a->vd, 1, MO_64);
+ accfn(rd1, tmp, rd1);
tcg_temp_free_i64(tmp);
- } else {
- write_neon_element64(rd0, a->vd, 0, MO_64);
- write_neon_element64(rd1, a->vd, 1, MO_64);
}
+ write_neon_element64(rd0, a->vd, 0, MO_64);
+ write_neon_element64(rd1, a->vd, 1, MO_64);
tcg_temp_free_i64(rd0);
tcg_temp_free_i64(rd1);
@@ -2670,16 +2667,14 @@ static bool do_2scalar_long(DisasContext *s,
arg_2scalar *a,
if (accfn) {
TCGv_i64 t64 = tcg_temp_new_i64();
read_neon_element64(t64, a->vd, 0, MO_64);
- accfn(t64, t64, rn0_64);
- write_neon_element64(t64, a->vd, 0, MO_64);
+ accfn(rn0_64, t64, rn0_64);
read_neon_element64(t64, a->vd, 1, MO_64);
- accfn(t64, t64, rn1_64);
- write_neon_element64(t64, a->vd, 1, MO_64);
+ accfn(rn1_64, t64, rn1_64);
tcg_temp_free_i64(t64);
- } else {
- write_neon_element64(rn0_64, a->vd, 0, MO_64);
- write_neon_element64(rn1_64, a->vd, 1, MO_64);
}
+
+ write_neon_element64(rn0_64, a->vd, 0, MO_64);
+ write_neon_element64(rn1_64, a->vd, 1, MO_64);
tcg_temp_free_i64(rn0_64);
tcg_temp_free_i64(rn1_64);
return true;
--
2.20.1
- [PULL 03/26] target/arm: Use neon_element_offset in neon_load/store_reg, (continued)
- [PULL 03/26] target/arm: Use neon_element_offset in neon_load/store_reg, Peter Maydell, 2020/11/02
- [PULL 02/26] target/arm: Move neon_element_offset to translate.c, Peter Maydell, 2020/11/02
- [PULL 04/26] target/arm: Use neon_element_offset in vfp_reg_offset, Peter Maydell, 2020/11/02
- [PULL 06/26] target/arm: Expand read/write_neon_element32 to all MemOp, Peter Maydell, 2020/11/02
- [PULL 05/26] target/arm: Add read/write_neon_element32, Peter Maydell, 2020/11/02
- [PULL 07/26] target/arm: Rename neon_load_reg32 to vfp_load_reg32, Peter Maydell, 2020/11/02
- [PULL 08/26] target/arm: Add read/write_neon_element64, Peter Maydell, 2020/11/02
- [PULL 09/26] target/arm: Rename neon_load_reg64 to vfp_load_reg64, Peter Maydell, 2020/11/02
- [PULL 11/26] target/arm: Improve do_prewiden_3d, Peter Maydell, 2020/11/02
- [PULL 12/26] target/arm: Fix float16 pairwise Neon ops on big-endian hosts, Peter Maydell, 2020/11/02
- [PULL 10/26] target/arm: Simplify do_long_3d and do_2scalar_long,
Peter Maydell <=
- [PULL 13/26] target/arm: Fix VUDOT/VSDOT (scalar) on big-endian hosts, Peter Maydell, 2020/11/02
- [PULL 17/26] hw/arm/smmuv3: Fix potential integer overflow (CID 1432363), Peter Maydell, 2020/11/02
- [PULL 16/26] disas/capstone: Fix monitor disassembly of >32 bytes, Peter Maydell, 2020/11/02
- [PULL 19/26] hw/display/omap_lcdc: Fix potential NULL pointer dereference, Peter Maydell, 2020/11/02
- [PULL 15/26] target/arm: fix LORID_EL1 access check, Peter Maydell, 2020/11/02
- [PULL 18/26] hw/arm/boot: fix SVE for EL3 direct kernel boot, Peter Maydell, 2020/11/02
- [PULL 14/26] target/arm: fix handling of HCR.FB, Peter Maydell, 2020/11/02
- [PULL 20/26] hw/display/exynos4210_fimd: Fix potential NULL pointer dereference, Peter Maydell, 2020/11/02
- [PULL 21/26] target/arm: Get correct MMU index for other-security-state, Peter Maydell, 2020/11/02
- [PULL 23/26] hw/intc/arm_gicv3_cpuif: Make GIC maintenance interrupts work, Peter Maydell, 2020/11/02