[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 10/69] target/arm: Simplify op_smlaxxx for SMLAL*
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH v3 10/69] target/arm: Simplify op_smlaxxx for SMLAL* |
Date: |
Wed, 28 Aug 2019 12:03:57 -0700 |
Since all of the inputs and outputs are i32, dispense with
the intermediate promotion to i64 and use tcg_gen_add2_i32.
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
---
target/arm/translate.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/target/arm/translate.c b/target/arm/translate.c
index 58983ccf88..8813d40a2c 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -8151,8 +8151,7 @@ DO_QADDSUB(QDSUB, false, true)
static bool op_smlaxxx(DisasContext *s, arg_rrrr *a,
int add_long, bool nt, bool mt)
{
- TCGv_i32 t0, t1;
- TCGv_i64 t64;
+ TCGv_i32 t0, t1, tl, th;
if (s->thumb
? !arm_dc_feature(s, ARM_FEATURE_THUMB_DSP)
@@ -8176,12 +8175,14 @@ static bool op_smlaxxx(DisasContext *s, arg_rrrr *a,
store_reg(s, a->rd, t0);
break;
case 2:
- t64 = tcg_temp_new_i64();
- tcg_gen_ext_i32_i64(t64, t0);
+ tl = load_reg(s, a->ra);
+ th = load_reg(s, a->rd);
+ t1 = tcg_const_i32(0);
+ tcg_gen_add2_i32(tl, th, tl, th, t0, t1);
tcg_temp_free_i32(t0);
- gen_addq(s, t64, a->ra, a->rd);
- gen_storeq_reg(s, a->ra, a->rd, t64);
- tcg_temp_free_i64(t64);
+ tcg_temp_free_i32(t1);
+ store_reg(s, a->ra, tl);
+ store_reg(s, a->rd, th);
break;
default:
g_assert_not_reached();
--
2.17.1
- [Qemu-devel] [PATCH v3 01/69] target/arm: Use store_reg_from_load in thumb2 code, (continued)
- [Qemu-devel] [PATCH v3 01/69] target/arm: Use store_reg_from_load in thumb2 code, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 02/69] target/arm: Add stubs for aa32 decodetree, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 03/69] target/arm: Convert Data Processing (register), Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 07/69] target/arm: Simplify UMAAL, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 04/69] target/arm: Convert Data Processing (reg-shifted-reg), Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 08/69] target/arm: Convert Saturating addition and subtraction, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 05/69] target/arm: Convert Data Processing (immediate), Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 06/69] target/arm: Convert multiply and multiply accumulate, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 09/69] target/arm: Convert Halfword multiply and multiply accumulate, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 12/69] target/arm: Convert MSR (immediate) and hints, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 10/69] target/arm: Simplify op_smlaxxx for SMLAL*,
Richard Henderson <=
- [Qemu-devel] [PATCH v3 15/69] target/arm: Convert BX, BXJ, BLX (register), Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 11/69] target/arm: Simplify op_smlawx for SMLAW*, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 16/69] target/arm: Convert CLZ, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 13/69] target/arm: Convert MRS/MSR (banked, register), Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 14/69] target/arm: Convert Cyclic Redundancy Check, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 17/69] target/arm: Convert ERET, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 19/69] target/arm: Convert T32 ADDW/SUBW, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 18/69] target/arm: Convert the rest of A32 Miscelaneous instructions, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 22/69] target/arm: Diagnose UNPREDICTABLE ldrex/strex cases, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 23/69] target/arm: Convert USAD8, USADA8, SBFX, UBFX, BFC, BFI, UDF, Richard Henderson, 2019/08/28