[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 18/22] target/arm: Introduce float*_maybe_ah_chs
From: |
Richard Henderson |
Subject: |
[PATCH 18/22] target/arm: Introduce float*_maybe_ah_chs |
Date: |
Mon, 27 Jan 2025 15:26:00 -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 00/22] target/arm: FEAT_AFP followups for FEAT_SME2, Richard Henderson, 2025/01/27
- [PATCH 01/22] target/arm: Rename FPST_FPCR_A32 to FPST_A32, Richard Henderson, 2025/01/27
- [PATCH 03/22] target/arm: Rename FPST_FPCR_F16_A32 to FPST_A32_F16, Richard Henderson, 2025/01/27
- [PATCH 05/22] target/arm: Rename FPST_FPCR_AH* to FPST_AH*, Richard Henderson, 2025/01/27
- [PATCH 02/22] target/arm: Rename FPST_FPCR_A64 to FPST_A64, Richard Henderson, 2025/01/27
- [PATCH 07/22] target/arm: Remove standard_fp_status_f16, Richard Henderson, 2025/01/27
- [PATCH 16/22] target/arm: Simplify DO_VFP_cmp in vfp_helper.c, Richard Henderson, 2025/01/27
- [PATCH 18/22] target/arm: Introduce float*_maybe_ah_chs,
Richard Henderson <=
- [PATCH 06/22] target/arm: Introduce CPUARMState.vfp.fp_status[], Richard Henderson, 2025/01/27
- [PATCH 04/22] target/arm: Rename FPST_FPCR_F16_A64 to FPST_A64_F16, Richard Henderson, 2025/01/27
- [PATCH 08/22] target/arm: Remove standard_fp_status, Richard Henderson, 2025/01/27
- [PATCH 09/22] target/arm: Remove ah_fp_status_f16, Richard Henderson, 2025/01/27
- [PATCH 13/22] target/arm: Remove fp_status_a64, Richard Henderson, 2025/01/27
- [PATCH 15/22] target/arm: Simplify fp_status indexing in mve_helper.c, Richard Henderson, 2025/01/27
- [PATCH 12/22] target/arm: Remove fp_status_f16_a32, Richard Henderson, 2025/01/27
- [PATCH 14/22] target/arm: Remove fp_status_a32, Richard Henderson, 2025/01/27
- [PATCH 10/22] target/arm: Remove ah_fp_status, Richard Henderson, 2025/01/27
- [PATCH 11/22] target/arm: Remove fp_status_f16_a64, Richard Henderson, 2025/01/27