[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 14/54] tcg/i386: Conditionalize tcg_out_extu_i32_i64
From: |
Richard Henderson |
Subject: |
[PATCH v2 14/54] tcg/i386: Conditionalize tcg_out_extu_i32_i64 |
Date: |
Mon, 10 Apr 2023 18:04:32 -0700 |
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 40d661072b..a156929477 100644
--- a/tcg/i386/tcg-target.c.inc
+++ b/tcg/i386/tcg-target.c.inc
@@ -1306,7 +1306,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 inline void tcg_out_bswap64(TCGContext *s, int reg)
--
2.34.1
- [PATCH v2 11/54] tcg/mips: Conditionalize tcg_out_exts_i32_i64, (continued)
- [PATCH v2 11/54] tcg/mips: Conditionalize tcg_out_exts_i32_i64, Richard Henderson, 2023/04/10
- [PATCH v2 12/54] tcg/riscv: Conditionalize tcg_out_exts_i32_i64, Richard Henderson, 2023/04/10
- [PATCH v2 13/54] tcg: Split out tcg_out_extu_i32_i64, Richard Henderson, 2023/04/10
- [PATCH v2 20/54] tcg/i386: Rationalize args to tcg_out_qemu_{ld,st}, Richard Henderson, 2023/04/10
- [PATCH v2 21/54] tcg/aarch64: Rationalize args to tcg_out_qemu_{ld, st}, Richard Henderson, 2023/04/10
- [PATCH v2 23/54] tcg/mips: Rationalize args to tcg_out_qemu_{ld,st}, Richard Henderson, 2023/04/10
- [PATCH v2 14/54] tcg/i386: Conditionalize tcg_out_extu_i32_i64,
Richard Henderson <=
- [PATCH v2 16/54] tcg: Introduce tcg_out_movext, Richard Henderson, 2023/04/10
- [PATCH v2 25/54] tcg/ppc: Rationalize args to tcg_out_qemu_{ld,st}, Richard Henderson, 2023/04/10
- [PATCH v2 15/54] tcg: Split out tcg_out_extrl_i64_i32, Richard Henderson, 2023/04/10
- [PATCH v2 26/54] tcg/s390x: Pass TCGType to tcg_out_qemu_{ld,st}, Richard Henderson, 2023/04/10
- [PATCH v2 17/54] tcg: Introduce tcg_out_xchg, Richard Henderson, 2023/04/10