@samitouri / QOSamiQemu / commits / 19b9888fd7

target/arm: Generalize TRANS_FEAT_STREAMING_SME2

Rename to TRANS_FEAT_STREAMING_IF and add a new parameter. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20260609192110.752384-5-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Richard Henderson committed Jun 9, 2026 at 12:20 UTC 19b9888fd710a2e54a6673d38301bc2afa515a0c
2 files changed +9 -9
target/arm/tcg/translate-sve.c
+6 -6
@@ -4261,9 +4261,9 @@ static gen_helper_gvec_4_ptr * const sve2_famax_zpzz_fns[4] = {
4261 gen_helper_sve2_famax_s,
4262 gen_helper_sve2_famax_d
4263 };
4264 -TRANS_FEAT_STREAMING_SME2(FAMAX, aa64_sme2_or_sve2_faminmax,
4265 - gen_gvec_fpst_arg_zpzz,
4266 - sve2_famax_zpzz_fns[a->esz], a)
4264 +TRANS_FEAT_STREAMING_IF(FAMAX, aa64_sme2_or_sve2_faminmax, aa64_sme2,
4265 + gen_gvec_fpst_arg_zpzz,
4266 + sve2_famax_zpzz_fns[a->esz], a)
4267
4268 static gen_helper_gvec_4_ptr * const sve2_famin_zpzz_fns[4] = {
4269 NULL,
@@ -4271,9 +4271,9 @@ static gen_helper_gvec_4_ptr * const sve2_famin_zpzz_fns[4] = {
4271 gen_helper_sve2_famin_s,
4272 gen_helper_sve2_famin_d
4273 };
4274 -TRANS_FEAT_STREAMING_SME2(FAMIN, aa64_sme2_or_sve2_faminmax,
4275 - gen_gvec_fpst_arg_zpzz,
4276 - sve2_famin_zpzz_fns[a->esz], a)
4274 +TRANS_FEAT_STREAMING_IF(FAMIN, aa64_sme2_or_sve2_faminmax, aa64_sme2,
4275 + gen_gvec_fpst_arg_zpzz,
4276 + sve2_famin_zpzz_fns[a->esz], a)
4277
4278 typedef void gen_helper_sve_fp2scalar(TCGv_ptr, TCGv_ptr, TCGv_ptr,
4279 TCGv_i64, TCGv_ptr, TCGv_i32);
target/arm/tcg/translate.h
+3 -3
@@ -880,12 +880,12 @@ static inline void gen_restore_rmode(TCGv_i32 old, TCGv_ptr fpst)
880
881 /*
882 * For SVE insns which are only valid in Streaming SVE mode when
883 - * SME2 is implemented
883 + * FEAT_STREAM is implemented.
884 */
885 -#define TRANS_FEAT_STREAMING_SME2(NAME, FEAT, FUNC, ...) \
885 +#define TRANS_FEAT_STREAMING_IF(NAME, FEAT, FEAT_STREAM, FUNC, ...) \
886 static bool trans_##NAME(DisasContext *s, arg_##NAME *a) \
887 { \
888 - s->is_nonstreaming = !dc_isar_feature(aa64_sme2, s); \
888 + s->is_nonstreaming = !dc_isar_feature(FEAT_STREAM, s); \
889 return dc_isar_feature(FEAT, s) && FUNC(s, __VA_ARGS__); \
890 }
891