[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 22/35] target/ppc: Update do_frsp for new flags
From: |
Richard Henderson |
Subject: |
[PATCH 22/35] target/ppc: Update do_frsp for new flags |
Date: |
Fri, 19 Nov 2021 17:04:49 +0100 |
Now that vxsnan is computed directly by softfloat,
we don't need to recompute it.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/ppc/fpu_helper.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/target/ppc/fpu_helper.c b/target/ppc/fpu_helper.c
index e91a6b0212..38f20e9783 100644
--- a/target/ppc/fpu_helper.c
+++ b/target/ppc/fpu_helper.c
@@ -675,18 +675,13 @@ FPU_FMADD(fnmsub, NMSUB_FLGS)
/* frsp - frsp. */
static uint64_t do_frsp(CPUPPCState *env, uint64_t arg, uintptr_t retaddr)
{
- CPU_DoubleU farg;
- float32 f32;
+ float32 f32 = float64_to_float32(arg, &env->fp_status);
+ int flags = get_float_exception_flags(&env->fp_status);
- farg.ll = arg;
-
- if (unlikely(float64_is_signaling_nan(farg.d, &env->fp_status))) {
+ if (unlikely(flags & float_flag_invalid_snan)) {
float_invalid_op_vxsnan(env, retaddr);
}
- f32 = float64_to_float32(farg.d, &env->fp_status);
- farg.d = float32_to_float64(f32, &env->fp_status);
-
- return farg.ll;
+ return float32_to_float64(f32, &env->fp_status);
}
uint64_t helper_frsp(CPUPPCState *env, uint64_t arg)
--
2.25.1
- [PATCH 15/35] target/ppc: Use FloatRoundMode in do_fri, (continued)
- [PATCH 15/35] target/ppc: Use FloatRoundMode in do_fri, Richard Henderson, 2021/11/19
- [PATCH 16/35] target/ppc: Tidy inexact handling in do_fri, Richard Henderson, 2021/11/19
- [PATCH 17/35] target/ppc: Clean up do_fri, Richard Henderson, 2021/11/19
- [PATCH 18/35] target/ppc: Update fmadd for new flags, Richard Henderson, 2021/11/19
- [PATCH 13/35] target/ppc: Fix VXCVI return value, Richard Henderson, 2021/11/19
- [PATCH 14/35] target/ppc: Remove inline from do_fri, Richard Henderson, 2021/11/19
- [PATCH 19/35] target/ppc: Split out do_fmadd, Richard Henderson, 2021/11/19
- [PATCH 20/35] target/ppc: Do not call do_float_check_status from do_fmadd, Richard Henderson, 2021/11/19
- [PATCH 21/35] target/ppc: Split out do_frsp, Richard Henderson, 2021/11/19
- [PATCH 23/35] target/ppc: Use helper_todouble in do_frsp, Richard Henderson, 2021/11/19
- [PATCH 22/35] target/ppc: Update do_frsp for new flags,
Richard Henderson <=
- [PATCH 24/35] target/ppc: Update sqrt for new flags, Richard Henderson, 2021/11/19
- [PATCH 25/35] target/ppc: Update xsrqpi and xsrqpxp to new flags, Richard Henderson, 2021/11/19
- [PATCH 26/35] target/ppc: Update fre to new flags, Richard Henderson, 2021/11/19
- [PATCH 28/35] target/ppc: Add helpers for fmadds et al, Richard Henderson, 2021/11/19
- [PATCH 27/35] softfloat: Add float64r32 arithmetic routines, Richard Henderson, 2021/11/19
- [PATCH 29/35] target/ppc: Add helper for fsqrts, Richard Henderson, 2021/11/19
- [PATCH 30/35] target/ppc: Add helpers for fadds, fsubs, fdivs, Richard Henderson, 2021/11/19
- [PATCH 31/35] target/ppc: Add helper for fmuls, Richard Henderson, 2021/11/19
- [PATCH 32/35] target/ppc: Add helper for frsqrtes, Richard Henderson, 2021/11/19
- [PATCH 34/35] target/ppc: Use helper_todouble/tosingle in helper_xststdcsp, Richard Henderson, 2021/11/19