[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 041/102] target/ppc: Update do_frsp for new flags
From: |
Cédric Le Goater |
Subject: |
[PULL 041/102] target/ppc: Update do_frsp for new flags |
Date: |
Wed, 15 Dec 2021 18:02:56 +0100 |
From: Richard Henderson <richard.henderson@linaro.org>
Now that vxsnan is computed directly by softfloat,
we don't need to recompute it.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20211119160502.17432-23-richard.henderson@linaro.org>
Signed-off-by: Cédric Le Goater <clg@kaod.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 77ab6f9e6426..65acf605b78f 100644
--- a/target/ppc/fpu_helper.c
+++ b/target/ppc/fpu_helper.c
@@ -723,18 +723,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;
-
- farg.ll = arg;
+ float32 f32 = float64_to_float32(arg, &env->fp_status);
+ int flags = get_float_exception_flags(&env->fp_status);
- 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.31.1
- [PULL 017/102] docs: rSTify ppc-spapr-hcalls.txt, (continued)
- [PULL 017/102] docs: rSTify ppc-spapr-hcalls.txt, Cédric Le Goater, 2021/12/15
- [PULL 024/102] softfloat: Add flag specific to sqrt(-x), Cédric Le Goater, 2021/12/15
- [PULL 028/102] target/ppc: Update float_invalid_op_mul for new flags, Cédric Le Goater, 2021/12/15
- [PULL 016/102] docs: Introducing pseries documentation., Cédric Le Goater, 2021/12/15
- [PULL 037/102] target/ppc: Update fmadd for new flags, Cédric Le Goater, 2021/12/15
- [PULL 031/102] target/ppc: Update float_invalid_cvt for new flags, Cédric Le Goater, 2021/12/15
- [PULL 020/102] softfloat: Extend float_exception_flags to 16 bits, Cédric Le Goater, 2021/12/15
- [PULL 035/102] target/ppc: Tidy inexact handling in do_fri, Cédric Le Goater, 2021/12/15
- [PULL 044/102] target/ppc: Update xsrqpi and xsrqpxp to new flags, Cédric Le Goater, 2021/12/15
- [PULL 034/102] target/ppc: Use FloatRoundMode in do_fri, Cédric Le Goater, 2021/12/15
- [PULL 041/102] target/ppc: Update do_frsp for new flags,
Cédric Le Goater <=
- [PULL 029/102] target/ppc: Update float_invalid_op_div for new flags, Cédric Le Goater, 2021/12/15
- [PULL 039/102] target/ppc: Do not call do_float_check_status from do_fmadd, Cédric Le Goater, 2021/12/15
- [PULL 032/102] target/ppc: Fix VXCVI return value, Cédric Le Goater, 2021/12/15
- [PULL 030/102] target/ppc: Move float_check_status from FPU_FCTI to translate, Cédric Le Goater, 2021/12/15
- [PULL 040/102] target/ppc: Split out do_frsp, Cédric Le Goater, 2021/12/15
- [PULL 036/102] target/ppc: Clean up do_fri, Cédric Le Goater, 2021/12/15
- [PULL 038/102] target/ppc: Split out do_fmadd, Cédric Le Goater, 2021/12/15
- [PULL 050/102] target/ppc: Add helper for fmuls, Cédric Le Goater, 2021/12/15
- [PULL 048/102] target/ppc: Add helper for fsqrts, Cédric Le Goater, 2021/12/15
- [PULL 047/102] target/ppc: Add helpers for fmadds et al, Cédric Le Goater, 2021/12/15