Skip to content

Commit 9af1de0

Browse files
rth7680Michael Tokarev
authored andcommitted
target/arm: Fix PSEL size operands to tcg_gen_gvec_ands
Gvec only operates on size 8 and multiples of 16. Predicates may be any multiple of 2. Round up the size using the appropriate function. Cc: [email protected] Fixes: 598ab0b ("target/arm: Implement PSEL") Reviewed-by: Peter Maydell <[email protected]> Signed-off-by: Richard Henderson <[email protected]> Message-id: [email protected] Signed-off-by: Peter Maydell <[email protected]> (cherry picked from commit 3801c5b75ffc60957265513338e8fd5f8b6ce8a1) Signed-off-by: Michael Tokarev <[email protected]>
1 parent c76ec8d commit 9af1de0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

target/arm/tcg/translate-sve.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7282,6 +7282,7 @@ static bool trans_PSEL(DisasContext *s, arg_psel *a)
72827282
tcg_gen_neg_i64(tmp, tmp);
72837283

72847284
/* Apply to either copy the source, or write zeros. */
7285+
pl = size_for_gvec(pl);
72857286
tcg_gen_gvec_ands(MO_64, pred_full_reg_offset(s, a->pd),
72867287
pred_full_reg_offset(s, a->pn), tmp, pl, pl);
72877288
return true;

0 commit comments

Comments
 (0)