mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-17 15:12:07 -06:00
target/arm: Implement SVE2 Integer Multiply - Unpredicated
For MUL, we can rely on generic support. For SMULH and UMULH,
create some trivial helpers. For PMUL, back in a21bb78e58
,
we organized helper_gvec_pmul_b in preparation for this use.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20210525010358.152808-3-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
2dc10fa2f9
commit
5dad1ba52f
4 changed files with 166 additions and 0 deletions
|
@ -5795,3 +5795,53 @@ static bool trans_MOVPRFX_z(DisasContext *s, arg_rpr_esz *a)
|
|||
{
|
||||
return do_movz_zpz(s, a->rd, a->rn, a->pg, a->esz, false);
|
||||
}
|
||||
|
||||
/*
|
||||
* SVE2 Integer Multiply - Unpredicated
|
||||
*/
|
||||
|
||||
static bool trans_MUL_zzz(DisasContext *s, arg_rrr_esz *a)
|
||||
{
|
||||
if (!dc_isar_feature(aa64_sve2, s)) {
|
||||
return false;
|
||||
}
|
||||
if (sve_access_check(s)) {
|
||||
gen_gvec_fn_zzz(s, tcg_gen_gvec_mul, a->esz, a->rd, a->rn, a->rm);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool do_sve2_zzz_ool(DisasContext *s, arg_rrr_esz *a,
|
||||
gen_helper_gvec_3 *fn)
|
||||
{
|
||||
if (fn == NULL || !dc_isar_feature(aa64_sve2, s)) {
|
||||
return false;
|
||||
}
|
||||
if (sve_access_check(s)) {
|
||||
gen_gvec_ool_zzz(s, fn, a->rd, a->rn, a->rm, 0);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool trans_SMULH_zzz(DisasContext *s, arg_rrr_esz *a)
|
||||
{
|
||||
static gen_helper_gvec_3 * const fns[4] = {
|
||||
gen_helper_gvec_smulh_b, gen_helper_gvec_smulh_h,
|
||||
gen_helper_gvec_smulh_s, gen_helper_gvec_smulh_d,
|
||||
};
|
||||
return do_sve2_zzz_ool(s, a, fns[a->esz]);
|
||||
}
|
||||
|
||||
static bool trans_UMULH_zzz(DisasContext *s, arg_rrr_esz *a)
|
||||
{
|
||||
static gen_helper_gvec_3 * const fns[4] = {
|
||||
gen_helper_gvec_umulh_b, gen_helper_gvec_umulh_h,
|
||||
gen_helper_gvec_umulh_s, gen_helper_gvec_umulh_d,
|
||||
};
|
||||
return do_sve2_zzz_ool(s, a, fns[a->esz]);
|
||||
}
|
||||
|
||||
static bool trans_PMUL_zzz(DisasContext *s, arg_rrr_esz *a)
|
||||
{
|
||||
return do_sve2_zzz_ool(s, a, gen_helper_gvec_pmul_b);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue