[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 012/114] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zzzz
From: |
Richard Henderson |
Subject: |
[PATCH 012/114] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zzzz |
Date: |
Fri, 27 May 2022 11:17:25 -0700 |
Convert SVE translation functions directly using
gen_gvec_ool_arg_zzzz to TRANS_FEAT.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/translate-sve.c | 47 ++++++++------------------------------
1 file changed, 10 insertions(+), 37 deletions(-)
diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c
index cae6df705a..f7367a4f62 100644
--- a/target/arm/translate-sve.c
+++ b/target/arm/translate-sve.c
@@ -8302,37 +8302,15 @@ static bool trans_FMLSLT_zzxw(DisasContext *s,
arg_rrxr_esz *a)
return do_FMLAL_zzxw(s, a, true, true);
}
-static bool do_i8mm_zzzz_ool(DisasContext *s, arg_rrrr_esz *a,
- gen_helper_gvec_4 *fn, int data)
-{
- if (!dc_isar_feature(aa64_sve_i8mm, s)) {
- return false;
- }
- return gen_gvec_ool_arg_zzzz(s, fn, a, data);
-}
+TRANS_FEAT(SMMLA, aa64_sve_i8mm, gen_gvec_ool_arg_zzzz,
+ gen_helper_gvec_smmla_b, a, 0)
+TRANS_FEAT(USMMLA, aa64_sve_i8mm, gen_gvec_ool_arg_zzzz,
+ gen_helper_gvec_usmmla_b, a, 0)
+TRANS_FEAT(UMMLA, aa64_sve_i8mm, gen_gvec_ool_arg_zzzz,
+ gen_helper_gvec_ummla_b, a, 0)
-static bool trans_SMMLA(DisasContext *s, arg_rrrr_esz *a)
-{
- return do_i8mm_zzzz_ool(s, a, gen_helper_gvec_smmla_b, 0);
-}
-
-static bool trans_USMMLA(DisasContext *s, arg_rrrr_esz *a)
-{
- return do_i8mm_zzzz_ool(s, a, gen_helper_gvec_usmmla_b, 0);
-}
-
-static bool trans_UMMLA(DisasContext *s, arg_rrrr_esz *a)
-{
- return do_i8mm_zzzz_ool(s, a, gen_helper_gvec_ummla_b, 0);
-}
-
-static bool trans_BFDOT_zzzz(DisasContext *s, arg_rrrr_esz *a)
-{
- if (!dc_isar_feature(aa64_sve_bf16, s)) {
- return false;
- }
- return gen_gvec_ool_arg_zzzz(s, gen_helper_gvec_bfdot, a, 0);
-}
+TRANS_FEAT(BFDOT_zzzz, aa64_sve_bf16, gen_gvec_ool_arg_zzzz,
+ gen_helper_gvec_bfdot, a, 0)
static bool trans_BFDOT_zzxz(DisasContext *s, arg_rrxr_esz *a)
{
@@ -8343,13 +8321,8 @@ static bool trans_BFDOT_zzxz(DisasContext *s,
arg_rrxr_esz *a)
a->rd, a->rn, a->rm, a->ra, a->index);
}
-static bool trans_BFMMLA(DisasContext *s, arg_rrrr_esz *a)
-{
- if (!dc_isar_feature(aa64_sve_bf16, s)) {
- return false;
- }
- return gen_gvec_ool_arg_zzzz(s, gen_helper_gvec_bfmmla, a, 0);
-}
+TRANS_FEAT(BFMMLA, aa64_sve_bf16, gen_gvec_ool_arg_zzzz,
+ gen_helper_gvec_bfmmla, a, 0)
static bool do_BFMLAL_zzzw(DisasContext *s, arg_rrrr_esz *a, bool sel)
{
--
2.34.1
- [PATCH 000/114] target/arm: Rewrite sve feature tests, Richard Henderson, 2022/05/27
- [PATCH 001/114] target/arm: Introduce TRANS, TRANS_FEAT, Richard Henderson, 2022/05/27
- [PATCH 002/114] target/arm: Move null function and sve check into gen_gvec_ool_zz, Richard Henderson, 2022/05/27
- [PATCH 003/114] target/arm: Use TRANS_FEAT for gen_gvec_ool_zz, Richard Henderson, 2022/05/27
- [PATCH 004/114] target/arm: Move null function and sve check into gen_gvec_ool_zzz, Richard Henderson, 2022/05/27
- [PATCH 005/114] target/arm: Introduce gen_gvec_ool_arg_zzz, Richard Henderson, 2022/05/27
- [PATCH 008/114] target/arm: Move null function and sve check into gen_gvec_ool_zzzz, Richard Henderson, 2022/05/27
- [PATCH 007/114] target/arm: Use TRANS_FEAT for do_sve2_zzz_ool, Richard Henderson, 2022/05/27
- [PATCH 009/114] target/arm: Use TRANS_FEAT for gen_gvec_ool_zzzz, Richard Henderson, 2022/05/27
- [PATCH 012/114] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zzzz,
Richard Henderson <=
- [PATCH 010/114] target/arm: Introduce gen_gvec_ool_arg_zzzz, Richard Henderson, 2022/05/27
- [PATCH 011/114] target/arm: Use TRANS_FEAT for do_sve2_zzzz_ool, Richard Henderson, 2022/05/27
- [PATCH 013/114] target/arm: Rename do_zzxz_ool to gen_gvec_ool_arg_zzxz, Richard Henderson, 2022/05/27
- [PATCH 006/114] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zzz, Richard Henderson, 2022/05/27
- [PATCH 015/114] target/arm: Use TRANS_FEAT for do_sve2_zzz_data, Richard Henderson, 2022/05/27
- [PATCH 016/114] target/arm: Use TRANS_FEAT for do_sve2_zzzz_data, Richard Henderson, 2022/05/27
- [PATCH 018/114] target/arm: Use TRANS_FEAT for USDOT_zzzz, Richard Henderson, 2022/05/27
- [PATCH 017/114] target/arm: Use TRANS_FEAT for do_sve2_zzw_data, Richard Henderson, 2022/05/27
- [PATCH 020/114] target/arm: Introduce gen_gvec_ool_arg_zpz, Richard Henderson, 2022/05/27
- [PATCH 021/114] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zpz, Richard Henderson, 2022/05/27