mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-22 09:31:09 +00:00
tcg: Fix expansion of INDEX_op_not_vec
This operation can always be emitted, even if we need to fall back to xor. Adjust the assertions to match. Backports commit 11978f6f58f1d3d66429f7ff897524f693d823ce from qemu
This commit is contained in:
parent
6f8c8046d8
commit
955661ad7b
|
@ -92,6 +92,9 @@ bool tcg_can_emit_vecop_list(const TCGOpcode *list,
|
|||
case INDEX_op_bitsel_vec:
|
||||
/* These opcodes are mandatory and should not be listed. */
|
||||
g_assert_not_reached();
|
||||
case INDEX_op_not_vec:
|
||||
/* These opcodes have generic expansions using the above. */
|
||||
g_assert_not_reached();
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -440,11 +443,14 @@ static bool do_op2(TCGContext *s, unsigned vece, TCGv_vec r, TCGv_vec a, TCGOpco
|
|||
|
||||
void tcg_gen_not_vec(TCGContext *s, unsigned vece, TCGv_vec r, TCGv_vec a)
|
||||
{
|
||||
const TCGOpcode *hold_list = tcg_swap_vecop_list(s, NULL);
|
||||
|
||||
if (!TCG_TARGET_HAS_not_vec || !do_op2(s, vece, r, a, INDEX_op_not_vec)) {
|
||||
TCGv_vec t = tcg_const_ones_vec_matching(s, r);
|
||||
tcg_gen_xor_vec(s, 0, r, a, t);
|
||||
tcg_temp_free_vec(s, t);
|
||||
}
|
||||
tcg_swap_vecop_list(s, hold_list);
|
||||
}
|
||||
|
||||
void tcg_gen_neg_vec(TCGContext *s, unsigned vece, TCGv_vec r, TCGv_vec a)
|
||||
|
|
Loading…
Reference in a new issue