Add versions of float*_ah_chs which takes fpcr_ah. These will help simplify some usages.
Signed-off-by: Richard Henderson <richard.hender...@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