|
@@ -229,32 +229,6 @@ void tcg_gen_mov_vec(TCGv_vec r, TCGv_vec a)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-TCGv_vec tcg_const_zeros_vec(TCGType type)
|
|
|
-{
|
|
|
- TCGv_vec ret = tcg_temp_new_vec(type);
|
|
|
- tcg_gen_dupi_vec(MO_64, ret, 0);
|
|
|
- return ret;
|
|
|
-}
|
|
|
-
|
|
|
-TCGv_vec tcg_const_ones_vec(TCGType type)
|
|
|
-{
|
|
|
- TCGv_vec ret = tcg_temp_new_vec(type);
|
|
|
- tcg_gen_dupi_vec(MO_64, ret, -1);
|
|
|
- return ret;
|
|
|
-}
|
|
|
-
|
|
|
-TCGv_vec tcg_const_zeros_vec_matching(TCGv_vec m)
|
|
|
-{
|
|
|
- TCGTemp *t = tcgv_vec_temp(m);
|
|
|
- return tcg_const_zeros_vec(t->base_type);
|
|
|
-}
|
|
|
-
|
|
|
-TCGv_vec tcg_const_ones_vec_matching(TCGv_vec m)
|
|
|
-{
|
|
|
- TCGTemp *t = tcgv_vec_temp(m);
|
|
|
- return tcg_const_ones_vec(t->base_type);
|
|
|
-}
|
|
|
-
|
|
|
void tcg_gen_dupi_vec(unsigned vece, TCGv_vec r, uint64_t a)
|
|
|
{
|
|
|
TCGTemp *rt = tcgv_vec_temp(r);
|
|
@@ -431,9 +405,7 @@ void tcg_gen_not_vec(unsigned vece, TCGv_vec r, TCGv_vec a)
|
|
|
const TCGOpcode *hold_list = tcg_swap_vecop_list(NULL);
|
|
|
|
|
|
if (!TCG_TARGET_HAS_not_vec || !do_op2(vece, r, a, INDEX_op_not_vec)) {
|
|
|
- TCGv_vec t = tcg_const_ones_vec_matching(r);
|
|
|
- tcg_gen_xor_vec(0, r, a, t);
|
|
|
- tcg_temp_free_vec(t);
|
|
|
+ tcg_gen_xor_vec(0, r, a, tcg_constant_vec_matching(r, 0, -1));
|
|
|
}
|
|
|
tcg_swap_vecop_list(hold_list);
|
|
|
}
|
|
@@ -446,9 +418,7 @@ void tcg_gen_neg_vec(unsigned vece, TCGv_vec r, TCGv_vec a)
|
|
|
hold_list = tcg_swap_vecop_list(NULL);
|
|
|
|
|
|
if (!TCG_TARGET_HAS_neg_vec || !do_op2(vece, r, a, INDEX_op_neg_vec)) {
|
|
|
- TCGv_vec t = tcg_const_zeros_vec_matching(r);
|
|
|
- tcg_gen_sub_vec(vece, r, t, a);
|
|
|
- tcg_temp_free_vec(t);
|
|
|
+ tcg_gen_sub_vec(vece, r, tcg_constant_vec_matching(r, vece, 0), a);
|
|
|
}
|
|
|
tcg_swap_vecop_list(hold_list);
|
|
|
}
|