mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
target/arm: Implement bfloat widening fma (vector)
This is BFMLAL{B,T} for both AArch64 AdvSIMD and SVE, and VFMA{B,T}.BF16 for AArch32 NEON. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20210525225817.400336-10-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
81266a1f58
commit
5693887f2e
7 changed files with 73 additions and 4 deletions
|
@ -8689,3 +8689,33 @@ static bool trans_BFMMLA(DisasContext *s, arg_rrrr_esz *a)
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool do_BFMLAL_zzzw(DisasContext *s, arg_rrrr_esz *a, bool sel)
|
||||
{
|
||||
if (!dc_isar_feature(aa64_sve_bf16, s)) {
|
||||
return false;
|
||||
}
|
||||
if (sve_access_check(s)) {
|
||||
TCGv_ptr status = fpstatus_ptr(FPST_FPCR);
|
||||
unsigned vsz = vec_full_reg_size(s);
|
||||
|
||||
tcg_gen_gvec_4_ptr(vec_full_reg_offset(s, a->rd),
|
||||
vec_full_reg_offset(s, a->rn),
|
||||
vec_full_reg_offset(s, a->rm),
|
||||
vec_full_reg_offset(s, a->ra),
|
||||
status, vsz, vsz, sel,
|
||||
gen_helper_gvec_bfmlal);
|
||||
tcg_temp_free_ptr(status);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool trans_BFMLALB_zzzw(DisasContext *s, arg_rrrr_esz *a)
|
||||
{
|
||||
return do_BFMLAL_zzzw(s, a, false);
|
||||
}
|
||||
|
||||
static bool trans_BFMLALT_zzzw(DisasContext *s, arg_rrrr_esz *a)
|
||||
{
|
||||
return do_BFMLAL_zzzw(s, a, true);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue