mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
tcg: Split out tcg_out_ext32u
We will need a backend interface for performing 32-bit zero-extend. 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
52bf3398c3
commit
9ecf5f61b8
11 changed files with 54 additions and 25 deletions
|
@ -663,6 +663,7 @@ static void tcg_out_bswap64(TCGContext *s, TCGReg ret, TCGReg arg)
|
|||
|
||||
static void tcg_out_ext32u(TCGContext *s, TCGReg ret, TCGReg arg)
|
||||
{
|
||||
tcg_debug_assert(TCG_TARGET_REG_BITS == 64);
|
||||
if (use_mips32r2_instructions) {
|
||||
tcg_out_opc_bf(s, OPC_DEXT, ret, arg, 31, 0);
|
||||
} else {
|
||||
|
@ -2297,7 +2298,6 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc,
|
|||
case INDEX_op_extrl_i64_i32:
|
||||
tcg_out_ext32s(s, a0, a1);
|
||||
break;
|
||||
case INDEX_op_ext32u_i64:
|
||||
case INDEX_op_extu_i32_i64:
|
||||
tcg_out_ext32u(s, a0, a1);
|
||||
break;
|
||||
|
@ -2446,6 +2446,7 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc,
|
|||
case INDEX_op_ext16s_i32:
|
||||
case INDEX_op_ext16s_i64:
|
||||
case INDEX_op_ext32s_i64:
|
||||
case INDEX_op_ext32u_i64:
|
||||
default:
|
||||
g_assert_not_reached();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue