diff options
| author | Richard Henderson <richard.henderson@linaro.org> | 2025-01-12 12:57:13 -0800 |
|---|---|---|
| committer | Richard Henderson <richard.henderson@linaro.org> | 2025-04-28 13:40:17 -0700 |
| commit | 1e6fec9dd90756b22331a3c4c6859c51ad3a2c3e (patch) | |
| tree | b9e66fae975abef1174ba8601e92021107cb2b8d /tcg/tcg-op.c | |
| parent | c1ad25de11ccf47a650c860f490864dcf7fe7675 (diff) | |
| download | focaccia-qemu-1e6fec9dd90756b22331a3c4c6859c51ad3a2c3e.tar.gz focaccia-qemu-1e6fec9dd90756b22331a3c4c6859c51ad3a2c3e.zip | |
tcg: Convert extrl_i64_i32 to TCGOutOpUnary
Drop the cast from TCGv_i64 to TCGv_i32 in tcg_gen_extrl_i64_i32 an emit extrl_i64_i32 unconditionally. Move that special case to tcg_gen_code when we find out if the output is live or dead. In this way even hosts that canonicalize truncations can make use of a store directly from the 64-bit host register. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg/tcg-op.c')
| -rw-r--r-- | tcg/tcg-op.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c index d3f3c9d248..7ecd1f6c8f 100644 --- a/tcg/tcg-op.c +++ b/tcg/tcg-op.c @@ -2962,11 +2962,9 @@ void tcg_gen_extrl_i64_i32(TCGv_i32 ret, TCGv_i64 arg) { if (TCG_TARGET_REG_BITS == 32) { tcg_gen_mov_i32(ret, TCGV_LOW(arg)); - } else if (TCG_TARGET_HAS_extr_i64_i32) { + } else { tcg_gen_op2(INDEX_op_extrl_i64_i32, TCG_TYPE_I32, tcgv_i32_arg(ret), tcgv_i64_arg(arg)); - } else { - tcg_gen_mov_i32(ret, (TCGv_i32)arg); } } |