[PATCH 5/6] target/arm: Implement FMUL (multiple/multiple and single vectors)
Richard Henderson <[email protected]>
| Newsgroups | org.nongnu.qemu-arm,org.nongnu.qemu-devel |
|---|---|
| Message-ID | <[email protected]> |
Signed-off-by: Richard Henderson <[email protected]> --- target/arm/tcg/translate-sme.c | 9 +++++++++ target/arm/tcg/sme.decode | 15 ++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/target/arm/tcg/translate-sme.c b/target/arm/tcg/translate-sme.c index 379764da24..840e91b677 100644 --- a/target/arm/tcg/translate-sme.c +++ b/target/arm/tcg/translate-sme.c @@ -895,6 +895,15 @@ static gen_helper_gvec_3_ptr * const f_vector_fscale[4] = { TRANS_FEAT(FSCALE_n1, aa64_sme2_f8cvt, do_zzz_n1_fpst, a, f_vector_fscale[a->esz]) TRANS_FEAT(FSCALE_nn, aa64_sme2_f8cvt, do_zzz_nn_fpst, a, f_vector_fscale[a->esz]) +static gen_helper_gvec_3_ptr * const f_vector_fmul[4] = { + NULL, + gen_helper_gvec_fmul_h, + gen_helper_gvec_fmul_s, + gen_helper_gvec_fmul_d, +}; +TRANS_FEAT(FMUL_n1, aa64_sme2p2, do_zzz_n1_fpst, a, f_vector_fmul[a->esz]) +TRANS_FEAT(FMUL_nn, aa64_sme2p2, do_zzz_nn_fpst, a, f_vector_fmul[a->esz]) + /* Add/Sub vector Z[m] to each Z[n*N] with result in ZA[d*N]. */ static bool do_azz_n1(DisasContext *s, arg_azz_n *a, int esz, GVecGen3FnVar *fn) diff --git a/target/arm/tcg/sme.decode b/target/arm/tcg/sme.decode index e1bef9987b..60c7cacc10 100644 --- a/target/arm/tcg/sme.decode +++ b/target/arm/tcg/sme.decode @@ -219,6 +219,8 @@ UMOPA2_s 1010000 1 10 0 ..... ... ... ..... . 10 .. @op_32 %zd_ax2 1:4 !function=times_2 %zd_ax4 2:3 !function=times_4 +%zn_ax2 6:4 !function=times_2 +%zn_ax4 7:3 !function=times_4 &zzz_en zd zn zm esz n @@ -288,6 +290,11 @@ SQDMULH_n1 1100000 1 .. 10 .... 1010.1 00000 .... 0 @z2z_4x1 FSCALE_n1 1100000 1 .. 10 .... 1010.0 01100 .... 0 @z2z_2x1 FSCALE_n1 1100000 1 .. 10 .... 1010.0 01100 .... 0 @z2z_4x1 +FMUL_n1 1100000 1 esz:2 1 zm:4 0 111010 ....0 ....0 \ + &zzz_en n=2 zd=%zd_ax2 zn=%zn_ax2 +FMUL_n1 1100000 1 esz:2 1 zm:4 1 111010 ...00 ...00 \ + &zzz_en n=4 zd=%zd_ax4 zn=%zn_ax4 + ### SME2 Multi-vector Multiple Vectors SVE Destructive %zm_ax2 17:4 !function=times_2 @@ -361,6 +368,11 @@ FAMIN_nn 1100000 1 .. 1 ..... 1011.0 01010 .... 1 @z2z_4x4 FSCALE_nn 1100000 1 .. 1 ..... 1011.0 01100 .... 0 @z2z_2x2 FSCALE_nn 1100000 1 .. 1 ..... 1011.0 01100 .... 0 @z2z_4x4 +FMUL_nn 1100000 1 esz:2 1 ....0 111001 ....0 ....0 \ + &zzz_en n=2 zd=%zd_ax2 zn=%zn_ax2 zm=%zm_ax2 +FMUL_nn 1100000 1 esz:2 1 ...01 111001 ...00 ...00 \ + &zzz_en n=4 zd=%zd_ax4 zn=%zn_ax4 zm=%zm_ax4 + ### SME2 Multi-vector Multiple and Single Array Vectors &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 ### SME2 Multi-vector Multiple Array Vectors -%zn_ax2 6:4 !function=times_2 -%zn_ax4 7:3 !function=times_4 - @azz_2x2_o3 ........ ... ..... . .. ... ..... .. off:3 \ &azz_n n=2 rv=%mova_rv zn=%zn_ax2 zm=%zm_ax2 @azz_4x4_o3 ........ ... ..... . .. ... ..... .. off:3 \ -- 2.43.0