aboutsummaryrefslogtreecommitdiff
path: root/target/arm
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2022-05-27 11:18:31 -0700
committerPeter Maydell <peter.maydell@linaro.org>2022-05-30 17:05:09 +0100
commit25aee7cc3bd0c9a1b273ec2ead99ddde42f5c04a (patch)
tree0ae444be153c227798aeba11dad7d7bfcbb6c436 /target/arm
parent41bf9b679953e54331cbf703dbd1ef6a7a779ea1 (diff)
target/arm: Use TRANS_FEAT for FMMLA
Being able to specify the feature predicate in TRANS_FEAT makes it easier to split trans_FMMLA by element size, which also happens to simplify the decode. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20220527181907.189259-79-richard.henderson@linaro.org Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm')
-rw-r--r--target/arm/sve.decode7
-rw-r--r--target/arm/translate-sve.c27
2 files changed, 7 insertions, 27 deletions
diff --git a/target/arm/sve.decode b/target/arm/sve.decode
index 7e79198f5b..a54feb2f61 100644
--- a/target/arm/sve.decode
+++ b/target/arm/sve.decode
@@ -1598,10 +1598,9 @@ SQRDCMLAH_zzzz 01000100 esz:2 0 rm:5 0011 rot:2 rn:5 rd:5 ra=%reg_movprfx
USDOT_zzzz 01000100 .. 0 ..... 011 110 ..... ..... @rda_rn_rm
### SVE2 floating point matrix multiply accumulate
-{
- BFMMLA 01100100 01 1 ..... 111 001 ..... ..... @rda_rn_rm_e0
- FMMLA 01100100 .. 1 ..... 111 001 ..... ..... @rda_rn_rm
-}
+BFMMLA 01100100 01 1 ..... 111 001 ..... ..... @rda_rn_rm_e0
+FMMLA_s 01100100 10 1 ..... 111 001 ..... ..... @rda_rn_rm_e0
+FMMLA_d 01100100 11 1 ..... 111 001 ..... ..... @rda_rn_rm_e0
### SVE2 Memory Gather Load Group
diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c
index a799ce3110..364e419f3e 100644
--- a/target/arm/translate-sve.c
+++ b/target/arm/translate-sve.c
@@ -7318,29 +7318,10 @@ DO_SVE2_ZPZZ_FP(FMINP, fminp)
* SVE Integer Multiply-Add (unpredicated)
*/
-static bool trans_FMMLA(DisasContext *s, arg_rrrr_esz *a)
-{
- gen_helper_gvec_4_ptr *fn;
-
- switch (a->esz) {
- case MO_32:
- if (!dc_isar_feature(aa64_sve_f32mm, s)) {
- return false;
- }
- fn = gen_helper_fmmla_s;
- break;
- case MO_64:
- if (!dc_isar_feature(aa64_sve_f64mm, s)) {
- return false;
- }
- fn = gen_helper_fmmla_d;
- break;
- default:
- return false;
- }
-
- return gen_gvec_fpst_zzzz(s, fn, a->rd, a->rn, a->rm, a->ra, 0, FPST_FPCR);
-}
+TRANS_FEAT(FMMLA_s, aa64_sve_f32mm, gen_gvec_fpst_zzzz, gen_helper_fmmla_s,
+ a->rd, a->rn, a->rm, a->ra, 0, FPST_FPCR)
+TRANS_FEAT(FMMLA_d, aa64_sve_f64mm, gen_gvec_fpst_zzzz, gen_helper_fmmla_d,
+ a->rd, a->rn, a->rm, a->ra, 0, FPST_FPCR)
static gen_helper_gvec_4 * const sqdmlal_zzzw_fns[] = {
NULL, gen_helper_sve2_sqdmlal_zzzw_h,