[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 045/101] target/ppc: Update fre to new flags
From: |
Cédric Le Goater |
Subject: |
[PULL 045/101] target/ppc: Update fre to new flags |
Date: |
Thu, 16 Dec 2021 21:25:18 +0100 |
From: Richard Henderson <richard.henderson@linaro.org>
Use float_flag_invalid_snan instead of recomputing
the snan-ness of the operand.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20211119160502.17432-27-richard.henderson@linaro.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
target/ppc/fpu_helper.c | 21 ++++++++-------------
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/target/ppc/fpu_helper.c b/target/ppc/fpu_helper.c
index 853e0aad1d4e..aef81a818f63 100644
--- a/target/ppc/fpu_helper.c
+++ b/target/ppc/fpu_helper.c
@@ -765,20 +765,15 @@ float64 helper_fre(CPUPPCState *env, float64 arg)
{
/* "Estimate" the reciprocal with actual division. */
float64 ret = float64_div(float64_one, arg, &env->fp_status);
- int status = get_float_exception_flags(&env->fp_status);
+ int flags = get_float_exception_flags(&env->fp_status);
- if (unlikely(status)) {
- if (status & float_flag_invalid) {
- if (float64_is_signaling_nan(arg, &env->fp_status)) {
- /* sNaN reciprocal */
- float_invalid_op_vxsnan(env, GETPC());
- }
- }
- if (status & float_flag_divbyzero) {
- float_zero_divide_excp(env, GETPC());
- /* For FPSCR.ZE == 0, the result is 1/2. */
- ret = float64_set_sign(float64_half, float64_is_neg(arg));
- }
+ if (unlikely(flags & float_flag_invalid_snan)) {
+ float_invalid_op_vxsnan(env, GETPC());
+ }
+ if (unlikely(flags & float_flag_divbyzero)) {
+ float_zero_divide_excp(env, GETPC());
+ /* For FPSCR.ZE == 0, the result is 1/2. */
+ ret = float64_set_sign(float64_half, float64_is_neg(arg));
}
return ret;
--
2.31.1
- [PULL 042/101] target/ppc: Use helper_todouble in do_frsp, (continued)
- [PULL 042/101] target/ppc: Use helper_todouble in do_frsp, Cédric Le Goater, 2021/12/16
- [PULL 052/101] target/ppc: Update fres to new flags and float64r32, Cédric Le Goater, 2021/12/16
- [PULL 061/101] ppc/ppc405: Change kernel load address, Cédric Le Goater, 2021/12/16
- [PULL 053/101] target/ppc: Use helper_todouble/tosingle in helper_xststdcsp, Cédric Le Goater, 2021/12/16
- [PULL 068/101] ppc/ppc405: Remove flash support, Cédric Le Goater, 2021/12/16
- [PULL 077/101] target/ppc: fix xscvqpdp register access, Cédric Le Goater, 2021/12/16
- [PULL 038/101] target/ppc: Split out do_fmadd, Cédric Le Goater, 2021/12/16
- [PULL 040/101] target/ppc: Split out do_frsp, Cédric Le Goater, 2021/12/16
- [PULL 041/101] target/ppc: Update do_frsp for new flags, Cédric Le Goater, 2021/12/16
- [PULL 044/101] target/ppc: Update xsrqpi and xsrqpxp to new flags, Cédric Le Goater, 2021/12/16
- [PULL 045/101] target/ppc: Update fre to new flags,
Cédric Le Goater <=
- [PULL 022/101] softfloat: Add flag specific to Inf * 0, Cédric Le Goater, 2021/12/16
- [PULL 032/101] target/ppc: Fix VXCVI return value, Cédric Le Goater, 2021/12/16
- [PULL 043/101] target/ppc: Update sqrt for new flags, Cédric Le Goater, 2021/12/16
- [PULL 050/101] target/ppc: Add helper for fmuls, Cédric Le Goater, 2021/12/16
- [PULL 047/101] target/ppc: Add helpers for fmadds et al, Cédric Le Goater, 2021/12/16
- [PULL 054/101] target/ppc: Disable software TLB for the 7450 family, Cédric Le Goater, 2021/12/16
- [PULL 060/101] target/ppc: remove 401/403 CPUs, Cédric Le Goater, 2021/12/16
- [PULL 062/101] ppc: Mark the 'taihu' machine as deprecated, Cédric Le Goater, 2021/12/16
- [PULL 064/101] ppc/ppc405: Convert printfs to trace-events, Cédric Le Goater, 2021/12/16
- [PULL 058/101] target/ppc: Remove 603e exception model, Cédric Le Goater, 2021/12/16