[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 03/57] tcg/i386: Conditionalize tcg_out_extu_i32_i64
From: |
Richard Henderson |
Subject: |
[PATCH v3 03/57] tcg/i386: Conditionalize tcg_out_extu_i32_i64 |
Date: |
Mon, 24 Apr 2023 06:40:11 +0100 |
Since TCG_TYPE_I32 values are kept zero-extended in registers, via
omission of the REXW bit, we need not extend if the register matches.
This is already relied upon by qemu_{ld,st}.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/i386/tcg-target.c.inc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc
index c8e2bf537f..ce87f8fbc9 100644
--- a/tcg/i386/tcg-target.c.inc
+++ b/tcg/i386/tcg-target.c.inc
@@ -1314,7 +1314,9 @@ static void tcg_out_exts_i32_i64(TCGContext *s, TCGReg
dest, TCGReg src)
static void tcg_out_extu_i32_i64(TCGContext *s, TCGReg dest, TCGReg src)
{
- tcg_out_ext32u(s, dest, src);
+ if (dest != src) {
+ tcg_out_ext32u(s, dest, src);
+ }
}
static void tcg_out_extrl_i64_i32(TCGContext *s, TCGReg dest, TCGReg src)
--
2.34.1
- [PATCH v3 00/57] tcg: Simplify calls to load/store helpers, Richard Henderson, 2023/04/24
- [PATCH v3 02/57] tcg/mips: Conditionalize tcg_out_exts_i32_i64, Richard Henderson, 2023/04/24
- [PATCH v3 01/57] tcg/loongarch64: Conditionalize tcg_out_exts_i32_i64, Richard Henderson, 2023/04/24
- [PATCH v3 03/57] tcg/i386: Conditionalize tcg_out_extu_i32_i64,
Richard Henderson <=
- [PATCH v3 04/57] tcg: Introduce tcg_out_movext2, Richard Henderson, 2023/04/24
- [PATCH v3 05/57] tcg/i386: Rationalize args to tcg_out_qemu_{ld,st}, Richard Henderson, 2023/04/24
- [PATCH v3 07/57] tcg/i386: Introduce HostAddress, Richard Henderson, 2023/04/24
- [PATCH v3 06/57] tcg/i386: Generalize multi-part load overlap test, Richard Henderson, 2023/04/24
- [PATCH v3 09/57] tcg/i386: Introduce tcg_out_testi, Richard Henderson, 2023/04/24
- [PATCH v3 11/57] tcg/i386: Use indexed addressing for softmmu fast path, Richard Henderson, 2023/04/24