Skip to content

Commit

Permalink
target/arm: Use FPST_F16 for SME FMOPA (widening)
Browse files Browse the repository at this point in the history
This operation has float16 inputs and thus must use
the FZ16 control not the FZ control.

Cc: [email protected]
Fixes: 3916841 ("target/arm: Implement FMOPA, FMOPS (widening)")
Reported-by: Daniyal Khan <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Reviewed-by: Alex Bennée <[email protected]>
Message-id: [email protected]
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2374
Signed-off-by: Richard Henderson <[email protected]>
Reviewed-by: Alex Bennée <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
(cherry picked from commit 207d30b)
Signed-off-by: Michael Tokarev <[email protected]>
  • Loading branch information
rth7680 authored and Michael Tokarev committed Jul 19, 2024
1 parent 0169889 commit 43929c8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions target/arm/tcg/translate-sme.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ static bool do_outprod(DisasContext *s, arg_op *a, MemOp esz,
}

static bool do_outprod_fpst(DisasContext *s, arg_op *a, MemOp esz,
ARMFPStatusFlavour e_fpst,
gen_helper_gvec_5_ptr *fn)
{
int svl = streaming_vec_reg_size(s);
Expand All @@ -319,15 +320,18 @@ static bool do_outprod_fpst(DisasContext *s, arg_op *a, MemOp esz,
zm = vec_full_reg_ptr(s, a->zm);
pn = pred_full_reg_ptr(s, a->pn);
pm = pred_full_reg_ptr(s, a->pm);
fpst = fpstatus_ptr(FPST_FPCR);
fpst = fpstatus_ptr(e_fpst);

fn(za, zn, zm, pn, pm, fpst, tcg_constant_i32(desc));
return true;
}

TRANS_FEAT(FMOPA_h, aa64_sme, do_outprod_fpst, a, MO_32, gen_helper_sme_fmopa_h)
TRANS_FEAT(FMOPA_s, aa64_sme, do_outprod_fpst, a, MO_32, gen_helper_sme_fmopa_s)
TRANS_FEAT(FMOPA_d, aa64_sme_f64f64, do_outprod_fpst, a, MO_64, gen_helper_sme_fmopa_d)
TRANS_FEAT(FMOPA_h, aa64_sme, do_outprod_fpst, a,
MO_32, FPST_FPCR_F16, gen_helper_sme_fmopa_h)
TRANS_FEAT(FMOPA_s, aa64_sme, do_outprod_fpst, a,
MO_32, FPST_FPCR, gen_helper_sme_fmopa_s)
TRANS_FEAT(FMOPA_d, aa64_sme_f64f64, do_outprod_fpst, a,
MO_64, FPST_FPCR, gen_helper_sme_fmopa_d)

/* TODO: FEAT_EBF16 */
TRANS_FEAT(BFMOPA, aa64_sme, do_outprod, a, MO_32, gen_helper_sme_bfmopa)
Expand Down

0 comments on commit 43929c8

Please sign in to comment.