[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 17/84] tcg/i386: Conditionalize tcg_out_extu_i32_i64
From: |
Richard Henderson |
Subject: |
[PATCH 17/84] tcg/i386: Conditionalize tcg_out_extu_i32_i64 |
Date: |
Wed, 3 May 2023 08:22:24 +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}.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
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 85fdea42b9..f8e7325a8b 100644
--- a/tcg/i386/tcg-target.c.inc
+++ b/tcg/i386/tcg-target.c.inc
@@ -1323,7 +1323,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 08/84] accel/tcg: Merge do_gen_mem_cb into caller, (continued)
- [PATCH 08/84] accel/tcg: Merge do_gen_mem_cb into caller, Richard Henderson, 2023/05/03
- [PATCH 10/84] accel/tcg: Widen plugin_gen_empty_mem_callback to i64, Richard Henderson, 2023/05/03
- [PATCH 05/84] tcg: Widen helper_atomic_* addresses to uint64_t, Richard Henderson, 2023/05/03
- [PATCH 12/84] tcg: Remove TCGv from tcg_gen_qemu_{ld,st}_*, Richard Henderson, 2023/05/03
- [PATCH 15/84] tcg/tci: Elimnate TARGET_LONG_BITS, target_ulong, Richard Henderson, 2023/05/03
- [PATCH 17/84] tcg/i386: Conditionalize tcg_out_extu_i32_i64,
Richard Henderson <=
- [PATCH 19/84] tcg/i386: Remove TARGET_LONG_BITS, TCG_TYPE_TL, Richard Henderson, 2023/05/03
- [PATCH 18/84] tcg/i386: Adjust type of tlb_mask, Richard Henderson, 2023/05/03
- [PATCH 28/84] tcg/sparc64: Remove TARGET_LONG_BITS, TCG_TYPE_TL, Richard Henderson, 2023/05/03
- [PATCH 22/84] tcg/aarch64: Remove TARGET_LONG_BITS, TCG_TYPE_TL, Richard Henderson, 2023/05/03
- [PATCH 20/84] tcg/arm: Remove TARGET_LONG_BITS, Richard Henderson, 2023/05/03