[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 10/42] tcg/loongarch64: Conditionalize tcg_out_exts_i32_i64
From: |
Richard Henderson |
Subject: |
[PATCH 10/42] tcg/loongarch64: Conditionalize tcg_out_exts_i32_i64 |
Date: |
Fri, 7 Apr 2023 19:42:42 -0700 |
Since TCG_TYPE_I32 values are kept sign-extended in registers,
via ".w" instructions, we need not extend if the register matches.
This is already relied upon by comparisons.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/loongarch64/tcg-target.c.inc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc
index 989632e08a..b2146988be 100644
--- a/tcg/loongarch64/tcg-target.c.inc
+++ b/tcg/loongarch64/tcg-target.c.inc
@@ -458,7 +458,9 @@ static void tcg_out_ext32s(TCGContext *s, TCGReg ret,
TCGReg arg)
static void tcg_out_exts_i32_i64(TCGContext *s, TCGReg ret, TCGReg arg)
{
- tcg_out_ext32s(s, ret, arg);
+ if (ret != arg) {
+ tcg_out_ext32s(s, ret, arg);
+ }
}
static void tcg_out_clzctz(TCGContext *s, LoongArchInsn opc,
--
2.34.1
- Re: [PATCH 03/42] tcg: Split out tcg_out_ext8s, (continued)
- [PATCH 04/42] tcg: Split out tcg_out_ext8u, Richard Henderson, 2023/04/07
- [PATCH 05/42] tcg: Split out tcg_out_ext16s, Richard Henderson, 2023/04/07
- [PATCH 06/42] tcg: Split out tcg_out_ext16u, Richard Henderson, 2023/04/07
- [PATCH 07/42] tcg: Split out tcg_out_ext32s, Richard Henderson, 2023/04/07
- [PATCH 08/42] tcg: Split out tcg_out_ext32u, Richard Henderson, 2023/04/07
- [PATCH 09/42] tcg: Split out tcg_out_exts_i32_i64, Richard Henderson, 2023/04/07
- [PATCH 10/42] tcg/loongarch64: Conditionalize tcg_out_exts_i32_i64,
Richard Henderson <=
- [PATCH 12/42] tcg/riscv: Conditionalize tcg_out_exts_i32_i64, Richard Henderson, 2023/04/07
- [PATCH 13/42] tcg: Split out tcg_out_extu_i32_i64, Richard Henderson, 2023/04/07
- [PATCH 11/42] tcg/mips: Conditionalize tcg_out_exts_i32_i64, Richard Henderson, 2023/04/07
- [PATCH 14/42] tcg/i386: Conditionalize tcg_out_extu_i32_i64, Richard Henderson, 2023/04/07
- [PATCH 15/42] tcg: Split out tcg_out_extrl_i64_i32, Richard Henderson, 2023/04/07
- [PATCH 16/42] tcg: Introduce tcg_out_movext, Richard Henderson, 2023/04/07
- [PATCH 17/42] tcg: Introduce tcg_out_xchg, Richard Henderson, 2023/04/07
- [PATCH 18/42] tcg: Introduce tcg_out_movext2, Richard Henderson, 2023/04/07
- [PATCH 19/42] tcg: Clear TCGLabelQemuLdst on allocation, Richard Henderson, 2023/04/07