@samitouri / QOSamiQemu / commits / 19ecbfd6c3

target/arm: Implement FMUL (multiple/multiple and single vectors)

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

Richard Henderson committed Aug 26, 2026 at 10:41 UTC 19ecbfd6c37a893d608279510de646098b2d8888
2 files changed +21 -3
target/arm/tcg/sme.decode
+12 -3
@@ -219,6 +219,8 @@ UMOPA2_s 1010000 1 10 0 ..... ... ... ..... . 10 .. @op_32
219
220 %zd_ax2 1:4 !function=times_2
221 %zd_ax4 2:3 !function=times_4
222 +%zn_ax2 6:4 !function=times_2
223 +%zn_ax4 7:3 !function=times_4
224
225 &zzz_en zd zn zm esz n
226
@@ -288,6 +290,11 @@ SQDMULH_n1 1100000 1 .. 10 .... 1010.1 00000 .... 0 @z2z_4x1
290 FSCALE_n1 1100000 1 .. 10 .... 1010.0 01100 .... 0 @z2z_2x1
291 FSCALE_n1 1100000 1 .. 10 .... 1010.0 01100 .... 0 @z2z_4x1
292
293 +FMUL_n1 1100000 1 esz:2 1 zm:4 0 111010 ....0 ....0 \
294 + &zzz_en n=2 zd=%zd_ax2 zn=%zn_ax2
295 +FMUL_n1 1100000 1 esz:2 1 zm:4 1 111010 ...00 ...00 \
296 + &zzz_en n=4 zd=%zd_ax4 zn=%zn_ax4
297 +
298 ### SME2 Multi-vector Multiple Vectors SVE Destructive
299
300 %zm_ax2 17:4 !function=times_2
@@ -361,6 +368,11 @@ FAMIN_nn 1100000 1 .. 1 ..... 1011.0 01010 .... 1 @z2z_4x4
368 FSCALE_nn 1100000 1 .. 1 ..... 1011.0 01100 .... 0 @z2z_2x2
369 FSCALE_nn 1100000 1 .. 1 ..... 1011.0 01100 .... 0 @z2z_4x4
370
371 +FMUL_nn 1100000 1 esz:2 1 ....0 111001 ....0 ....0 \
372 + &zzz_en n=2 zd=%zd_ax2 zn=%zn_ax2 zm=%zm_ax2
373 +FMUL_nn 1100000 1 esz:2 1 ...01 111001 ...00 ...00 \
374 + &zzz_en n=4 zd=%zd_ax4 zn=%zn_ax4 zm=%zm_ax4
375 +
376 ### SME2 Multi-vector Multiple and Single Array Vectors
377
378 &azz_n n off rv zn zm
@@ -521,9 +533,6 @@ FDOT_n1_hb 11000001 001 1 .... 0 .. 100 ..... 01 ... @azz_nx1_o3 n=4
533
534 ### SME2 Multi-vector Multiple Array Vectors
535
524 -%zn_ax2 6:4 !function=times_2
525 -%zn_ax4 7:3 !function=times_4
526 -
536 @azz_2x2_o3 ........ ... ..... . .. ... ..... .. off:3 \
537 &azz_n n=2 rv=%mova_rv zn=%zn_ax2 zm=%zm_ax2
538 @azz_4x4_o3 ........ ... ..... . .. ... ..... .. off:3 \
target/arm/tcg/translate-sme.c
+9
@@ -891,6 +891,15 @@ static gen_helper_gvec_3_ptr * const f_vector_fscale[4] = {
891 TRANS_FEAT(FSCALE_n1, aa64_sme2_f8cvt, do_zzz_n1_fpst, a, f_vector_fscale[a->esz])
892 TRANS_FEAT(FSCALE_nn, aa64_sme2_f8cvt, do_zzz_nn_fpst, a, f_vector_fscale[a->esz])
893
894 +static gen_helper_gvec_3_ptr * const f_vector_fmul[4] = {
895 + NULL,
896 + gen_helper_gvec_fmul_h,
897 + gen_helper_gvec_fmul_s,
898 + gen_helper_gvec_fmul_d,
899 +};
900 +TRANS_FEAT(FMUL_n1, aa64_sme2p2, do_zzz_n1_fpst, a, f_vector_fmul[a->esz])
901 +TRANS_FEAT(FMUL_nn, aa64_sme2p2, do_zzz_nn_fpst, a, f_vector_fmul[a->esz])
902 +
903 /* Add/Sub vector Z[m] to each Z[n*N] with result in ZA[d*N]. */
904 static bool do_azz_n1(DisasContext *s, arg_azz_n *a, int esz,
905 GVecGen3FnVar *fn)