@samitouri / QOSamiQemu / commits / 13146f8ecb

target/arm: Implement SME BFMUL

Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20260826174213.614571-14-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Richard Henderson committed Aug 26, 2026 at 10:42 UTC 13146f8ecbc36f1c4ba8d0a58dde747dc75f0f14
2 files changed +24 -4
target/arm/tcg/sme.decode
+20 -4
@@ -296,10 +296,18 @@ SQDMULH_n1 1100000 1 .. 10 .... 1010.1 00000 .... 0 @z2z_4x1
296 FSCALE_n1 1100000 1 .. 10 .... 1010.0 01100 .... 0 @z2z_4x1
297 }
298
299 -FMUL_n1 1100000 1 esz:2 1 zm:4 0 111010 ....0 ....0 \
299 +{
300 + BFMUL_n1 1100000 1 00 1 zm:4 0 111010 ....0 ....0 \
301 + &zzz_en n=2 zd=%zd_ax2 zn=%zn_ax2 esz=0
302 + FMUL_n1 1100000 1 esz:2 1 zm:4 0 111010 ....0 ....0 \
303 &zzz_en n=2 zd=%zd_ax2 zn=%zn_ax2
301 -FMUL_n1 1100000 1 esz:2 1 zm:4 1 111010 ...00 ...00 \
304 +}
305 +{
306 + BFMUL_n1 1100000 1 00 1 zm:4 1 111010 ...00 ...00 \
307 + &zzz_en n=4 zd=%zd_ax4 zn=%zn_ax4 esz=0
308 + FMUL_n1 1100000 1 esz:2 1 zm:4 1 111010 ...00 ...00 \
309 &zzz_en n=4 zd=%zd_ax4 zn=%zn_ax4
310 +}
311
312 ### SME2 Multi-vector Multiple Vectors SVE Destructive
313
@@ -380,10 +388,18 @@ FAMIN_nn 1100000 1 .. 1 ..... 1011.0 01010 .... 1 @z2z_4x4
388 FSCALE_nn 1100000 1 .. 1 ..... 1011.0 01100 .... 0 @z2z_4x4
389 }
390
383 -FMUL_nn 1100000 1 esz:2 1 ....0 111001 ....0 ....0 \
391 +{
392 + BFMUL_nn 1100000 1 00 1 ....0 111001 ....0 ....0 \
393 + &zzz_en n=2 zd=%zd_ax2 zn=%zn_ax2 zm=%zm_ax2 esz=0
394 + FMUL_nn 1100000 1 esz:2 1 ....0 111001 ....0 ....0 \
395 &zzz_en n=2 zd=%zd_ax2 zn=%zn_ax2 zm=%zm_ax2
385 -FMUL_nn 1100000 1 esz:2 1 ...01 111001 ...00 ...00 \
396 +}
397 +{
398 + BFMUL_nn 1100000 1 00 1 ...01 111001 ...00 ...00 \
399 + &zzz_en n=4 zd=%zd_ax4 zn=%zn_ax4 zm=%zm_ax4 esz=0
400 + FMUL_nn 1100000 1 esz:2 1 ...01 111001 ...00 ...00 \
401 &zzz_en n=4 zd=%zd_ax4 zn=%zn_ax4 zm=%zm_ax4
402 +}
403
404 ### SME2 Multi-vector Multiple and Single Array Vectors
405
target/arm/tcg/translate-sme.c
+4
@@ -903,6 +903,10 @@ static gen_helper_gvec_3_ptr * const f_vector_fmul[4] = {
903 };
904 TRANS_FEAT(FMUL_n1, aa64_sme2p2, do_zzz_n1_fpst, a, f_vector_fmul[a->esz])
905 TRANS_FEAT(FMUL_nn, aa64_sme2p2, do_zzz_nn_fpst, a, f_vector_fmul[a->esz])
906 +TRANS_FEAT(BFMUL_n1, aa64_sme2_sve_bfscale, do_zzz_n1_fpst, a,
907 + gen_helper_gvec_fmul_b16)
908 +TRANS_FEAT(BFMUL_nn, aa64_sme2_sve_bfscale, do_zzz_nn_fpst, a,
909 + gen_helper_gvec_fmul_b16)
910
911 /* Add/Sub vector Z[m] to each Z[n*N] with result in ZA[d*N]. */
912 static bool do_azz_n1(DisasContext *s, arg_azz_n *a, int esz,