Skip to content
Closed
2 changes: 2 additions & 0 deletions target/ppc/insn32.decode
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,8 @@ VINSWVRX 000100 ..... ..... ..... 00110001111 @VX
VSLDBI 000100 ..... ..... ..... 00 ... 010110 @VN
VSRDBI 000100 ..... ..... ..... 01 ... 010110 @VN

VSEL 000100 ..... ..... ..... ..... 101010 @VA

# VSX Load/Store Instructions

LXV 111101 ..... ..... ............ . 001 @DQ_TSX
Expand Down
12 changes: 12 additions & 0 deletions target/ppc/translate/vmx-impl.c.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1566,6 +1566,18 @@ static void gen_vpermr(DisasContext *ctx)
tcg_temp_free_ptr(rd);
}

static bool trans_VSEL(DisasContext *ctx, arg_VA *a)
{
REQUIRE_INSNS_FLAGS(ctx, ALTIVEC);
REQUIRE_VSX(ctx);

tcg_gen_gvec_bitsel(MO_64, avr_full_offset(a->vrt), avr_full_offset(a->rc),
avr_full_offset(a->vrb), avr_full_offset(a->vra),
16, 16);

return true;
}

GEN_VAFORM_PAIRED(vmsumubm, vmsummbm, 18)
GEN_VAFORM_PAIRED(vmsumuhm, vmsumuhs, 19)
GEN_VAFORM_PAIRED(vmsumshm, vmsumshs, 20)
Expand Down