mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
tcg: Split out tcg_out_extrl_i64_i32
We will need a backend interface for type truncation. For those backends that did not enable TCG_TARGET_HAS_extrl_i64_i32, use tcg_out_mov. Use it in tcg_reg_alloc_op in the meantime. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
b9bfe000f9
commit
b8b94ac675
11 changed files with 65 additions and 17 deletions
|
@ -817,6 +817,12 @@ static void tcg_out_extu_i32_i64(TCGContext *s, TCGReg dst, TCGReg src)
|
|||
tcg_out_ext32u(s, dst, src);
|
||||
}
|
||||
|
||||
static void tcg_out_extrl_i64_i32(TCGContext *s, TCGReg rd, TCGReg rn)
|
||||
{
|
||||
tcg_debug_assert(TCG_TARGET_REG_BITS == 64);
|
||||
tcg_out_mov(s, TCG_TYPE_I32, rd, rn);
|
||||
}
|
||||
|
||||
static inline void tcg_out_shli32(TCGContext *s, TCGReg dst, TCGReg src, int c)
|
||||
{
|
||||
tcg_out_rlw(s, RLWINM, dst, src, c, 0, 31 - c);
|
||||
|
@ -3138,6 +3144,7 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc,
|
|||
case INDEX_op_ext32u_i64:
|
||||
case INDEX_op_ext_i32_i64:
|
||||
case INDEX_op_extu_i32_i64:
|
||||
case INDEX_op_extrl_i64_i32:
|
||||
default:
|
||||
g_assert_not_reached();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue