aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-12-17 17:57:15 +0100
committerCédric Le Goater <clg@kaod.org>2021-12-17 17:57:15 +0100
commit734cfbd84e6951e136aea129b37e6e3d4a58913a (patch)
treeaf30fc52b1881d97cc3aeca78ea6c06f3b59a086 /target
parent7238e55bd6cc494728561e7367b8068182a915c3 (diff)
target/ppc: Update do_frsp for new flags
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>
Diffstat (limited to 'target')
-rw-r--r--target/ppc/fpu_helper.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/target/ppc/fpu_helper.c b/target/ppc/fpu_helper.c
index 77ab6f9e64..65acf605b7 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)