[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 18/34] target/arm: Introduce float*_maybe_ah_chs
From: |
Richard Henderson |
Subject: |
[PATCH v2 18/34] target/arm: Introduce float*_maybe_ah_chs |
Date: |
Tue, 28 Jan 2025 17:38:41 -0800 |
Add versions of float*_ah_chs which takes fpcr_ah.
These will help simplify some usages.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/tcg/vec_internal.h | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/target/arm/tcg/vec_internal.h b/target/arm/tcg/vec_internal.h
index a673935f48..6b93b5aeb9 100644
--- a/target/arm/tcg/vec_internal.h
+++ b/target/arm/tcg/vec_internal.h
@@ -285,4 +285,19 @@ static inline float64 float64_ah_chs(float64 a)
return float64_is_any_nan(a) ? a : float64_chs(a);
}
+static inline float16 float16_maybe_ah_chs(float16 a, bool fpcr_ah)
+{
+ return fpcr_ah && float16_is_any_nan(a) ? a : float16_chs(a);
+}
+
+static inline float32 float32_maybe_ah_chs(float32 a, bool fpcr_ah)
+{
+ return fpcr_ah && float32_is_any_nan(a) ? a : float32_chs(a);
+}
+
+static inline float64 float64_maybe_ah_chs(float64 a, bool fpcr_ah)
+{
+ return fpcr_ah && float64_is_any_nan(a) ? a : float64_chs(a);
+}
+
#endif /* TARGET_ARM_VEC_INTERNAL_H */
--
2.43.0
- [PATCH v2 15/34] target/arm: Simplify fp_status indexing in mve_helper.c, (continued)
- [PATCH v2 15/34] target/arm: Simplify fp_status indexing in mve_helper.c, Richard Henderson, 2025/01/28
- [PATCH v2 08/34] target/arm: Remove standard_fp_status, Richard Henderson, 2025/01/28
- [PATCH v2 17/34] target/arm: Move float*_ah_chs to vec_internal.h, Richard Henderson, 2025/01/28
- [PATCH v2 19/34] target/arm: Use float*_maybe_ah_chs in sve_ftssel_*, Richard Henderson, 2025/01/28
- [PATCH v2 12/34] target/arm: Remove fp_status_f16_a32, Richard Henderson, 2025/01/28
- [PATCH v2 16/34] target/arm: Simplify DO_VFP_cmp in vfp_helper.c, Richard Henderson, 2025/01/28
- [PATCH v2 18/34] target/arm: Introduce float*_maybe_ah_chs,
Richard Henderson <=
- [PATCH v2 20/34] target/arm: Use float*_maybe_ah_chs in sve_fcadd_*, Richard Henderson, 2025/01/28
- [PATCH v2 21/34] target/arm: Use float*_maybe_ah_chs in sve_fcadd_*, Richard Henderson, 2025/01/28
- [PATCH v2 23/34] target/arm: Use flags for AH negation in sve_ftmad_*, Richard Henderson, 2025/01/28
- [PATCH v2 22/34] target/arm: Use flags for AH negation in do_fmla_zpzzz_*, Richard Henderson, 2025/01/28
- [PATCH v2 24/34] target/arm: Use flags for AH negation in float*_ah_mulsub_f, Richard Henderson, 2025/01/28
- [PATCH v2 26/34] target/arm: Handle FPCR.AH in gvec_fcmla[hs]_idx, Richard Henderson, 2025/01/28
- [PATCH v2 28/34] target/arm: Split gvec_fmla_idx_* for fmls and ah_fmls, Richard Henderson, 2025/01/28
- [PATCH v2 25/34] target/arm: Handle FPCR.AH in gvec_fcmla[hsd], Richard Henderson, 2025/01/28
- [PATCH v2 27/34] target/arm: Handle FPCR.AH in sve_fcmla_zpzzz_*, Richard Henderson, 2025/01/28