diff mbox series

[v2,19/34] target/arm: Use float*_maybe_ah_chs in sve_ftssel_*

Message ID 20250129013857.135256-20-richard.henderson@linaro.org
State New
Headers show
Series target/arm: FEAT_AFP followups for FEAT_SME2 | expand

Commit Message

Richard Henderson Jan. 29, 2025, 1:38 a.m. UTC
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/arm/tcg/sve_helper.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/target/arm/tcg/sve_helper.c b/target/arm/tcg/sve_helper.c
index 3f38e07829..a2ff3b7f11 100644
--- a/target/arm/tcg/sve_helper.c
+++ b/target/arm/tcg/sve_helper.c
@@ -2563,8 +2563,8 @@  void HELPER(sve_ftssel_h)(void *vd, void *vn, void *vm, uint32_t desc)
         if (mm & 1) {
             nn = float16_one;
         }
-        if ((mm & 2) && !(fpcr_ah && float16_is_any_nan(nn))) {
-            nn ^= (1 << 15);
+        if (mm & 2) {
+            nn = float16_maybe_ah_chs(nn, fpcr_ah);
         }
         d[i] = nn;
     }
@@ -2581,8 +2581,8 @@  void HELPER(sve_ftssel_s)(void *vd, void *vn, void *vm, uint32_t desc)
         if (mm & 1) {
             nn = float32_one;
         }
-        if ((mm & 2) && !(fpcr_ah && float32_is_any_nan(nn))) {
-            nn ^= (1U << 31);
+        if (mm & 2) {
+            nn = float32_maybe_ah_chs(nn, fpcr_ah);
         }
         d[i] = nn;
     }
@@ -2599,8 +2599,8 @@  void HELPER(sve_ftssel_d)(void *vd, void *vn, void *vm, uint32_t desc)
         if (mm & 1) {
             nn = float64_one;
         }
-        if ((mm & 2) && !(fpcr_ah && float64_is_any_nan(nn))) {
-            nn ^= (1ULL << 63);
+        if (mm & 2) {
+            nn = float64_maybe_ah_chs(nn, fpcr_ah);
         }
         d[i] = nn;
     }