mirror of https://github.com/xemu-project/xemu.git
tcg/loongarch64: Use tcg_out_dup_vec in tcg_out_dupi_vec
Reviewed-by: Song Gao <gaosong@loongson.cn> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
15750faa8e
commit
75b5ffdd0d
|
@ -1749,24 +1749,8 @@ static void tcg_out_dupi_vec(TCGContext *s, TCGType type, unsigned vece,
|
||||||
|
|
||||||
/* TODO: vldi patterns when imm 12 is set */
|
/* TODO: vldi patterns when imm 12 is set */
|
||||||
|
|
||||||
/* Fallback to vreplgr2vr */
|
|
||||||
tcg_out_movi(s, TCG_TYPE_I64, TCG_REG_TMP0, value);
|
tcg_out_movi(s, TCG_TYPE_I64, TCG_REG_TMP0, value);
|
||||||
switch (vece) {
|
tcg_out_dup_vec(s, type, vece, rd, TCG_REG_TMP0);
|
||||||
case MO_8:
|
|
||||||
tcg_out_opc_vreplgr2vr_b(s, rd, TCG_REG_TMP0);
|
|
||||||
break;
|
|
||||||
case MO_16:
|
|
||||||
tcg_out_opc_vreplgr2vr_h(s, rd, TCG_REG_TMP0);
|
|
||||||
break;
|
|
||||||
case MO_32:
|
|
||||||
tcg_out_opc_vreplgr2vr_w(s, rd, TCG_REG_TMP0);
|
|
||||||
break;
|
|
||||||
case MO_64:
|
|
||||||
tcg_out_opc_vreplgr2vr_d(s, rd, TCG_REG_TMP0);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
g_assert_not_reached();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tcg_out_addsub_vec(TCGContext *s, unsigned vece, const TCGArg a0,
|
static void tcg_out_addsub_vec(TCGContext *s, unsigned vece, const TCGArg a0,
|
||||||
|
|
Loading…
Reference in New Issue