target/ppc: Use helper_todouble in do_frsp
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 17 Dec 2021 16:57:15 +0000 (17:57 +0100)
committerCédric Le Goater <clg@kaod.org>
Fri, 17 Dec 2021 16:57:15 +0000 (17:57 +0100)
We only needed one ieee arithmetic operation to raise
exceptions.  To convert back to register form, we can
use our simpler non-arithmetic function.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20211119160502.17432-24-richard.henderson@linaro.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
target/ppc/fpu_helper.c

index 65acf605b78f3ce47e7c61c661d637d9779e1c5e..870a861e36a24dfe053841665eb66a51c4815bf4 100644 (file)
@@ -729,7 +729,7 @@ static uint64_t do_frsp(CPUPPCState *env, uint64_t arg, uintptr_t retaddr)
     if (unlikely(flags & float_flag_invalid_snan)) {
         float_invalid_op_vxsnan(env, retaddr);
     }
-    return float32_to_float64(f32, &env->fp_status);
+    return helper_todouble(f32);
 }
 
 uint64_t helper_frsp(CPUPPCState *env, uint64_t arg)