diff mbox series

[20/35] target/ppc: Do not call do_float_check_status from do_fmadd

Message ID 20211119160502.17432-21-richard.henderson@linaro.org (mailing list archive)
State New, archived
Headers show
Series target/ppc fpu fixes and cleanups | expand

Commit Message

Richard Henderson Nov. 19, 2021, 4:04 p.m. UTC
We will process flags other than in valid in helper_float_check_status,
which is invoked after the writeback to FRT.
Fixes a bug in which FRT is not written when OE/UE/XE are enabled.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/ppc/fpu_helper.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/target/ppc/fpu_helper.c b/target/ppc/fpu_helper.c
index d2a7bf5e63..e0c35a3977 100644
--- a/target/ppc/fpu_helper.c
+++ b/target/ppc/fpu_helper.c
@@ -651,11 +651,8 @@  static float64 do_fmadd(CPUPPCState *env, float64 a, float64 b,
     float64 ret = float64_muladd(a, b, c, madd_flags, &env->fp_status);
     int flags = get_float_exception_flags(&env->fp_status);
 
-    if (flags) {
-        if (flags & float_flag_invalid) {
-            float_invalid_op_madd(env, flags, 1, retaddr);
-        }
-        do_float_check_status(env, retaddr);
+    if (unlikely(flags & float_flag_invalid)) {
+        float_invalid_op_madd(env, flags, 1, retaddr);
     }
     return ret;
 }