Re: [PATCH 03/12] target/ppc: Move V(ADD|SUB)CUW to decodetree and use gvec

2022-09-24 Thread Richard Henderson
On 9/23/22 21:47, Lucas Mateus Castro(alqotel) wrote: +static bool do_vx_vaddsubcuw(DisasContext *ctx, arg_VX *a, int add) +{ +static const TCGOpcode vecop_list[] = { +INDEX_op_cmp_vec, 0 +}; + +static const GVecGen3 op[] = { +{ +.fniv = gen_VSUBCUW, +

Re: [PATCH 03/12] target/ppc: Move V(ADD|SUB)CUW to decodetree and use gvec

2022-09-24 Thread Richard Henderson
On 9/23/22 21:47, Lucas Mateus Castro(alqotel) wrote: +static void gen_VADDCUW(unsigned vece, TCGv_vec t, TCGv_vec a, TCGv_vec b) +{ +tcg_gen_not_vec(vece, a, a); +tcg_gen_cmp_vec(TCG_COND_LTU, vece, t, a, b); +tcg_gen_and_vec(vece, t, t, tcg_constant_vec_matching(t, vece, 1)); +} I

[PATCH 03/12] target/ppc: Move V(ADD|SUB)CUW to decodetree and use gvec

2022-09-23 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" This patch moves VADDCUW and VSUBCUW to decodtree with gvec using an implementation based on the helper, with the main difference being changing the -1 (aka all bits set to 1) result returned by cmp when true to +1 vaddcuw: reptloopmaster