diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2021-12-17 17:57:15 +0100 |
---|---|---|
committer | Cédric Le Goater <clg@kaod.org> | 2021-12-17 17:57:15 +0100 |
commit | 2125ac18bfa3e9568b75906636ec9c69c628c0a0 (patch) | |
tree | fd9f08f700503ab8e5db833d6a96c9e43b35656b | |
parent | ffdaff8e9c698061f57a6b1827570562c5a1c909 (diff) |
target/ppc: Do not call do_float_check_status from do_fmadd
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>
Message-Id: <20211119160502.17432-21-richard.henderson@linaro.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
-rw-r--r-- | target/ppc/fpu_helper.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/target/ppc/fpu_helper.c b/target/ppc/fpu_helper.c index d7e0362e80..dd9d40f74b 100644 --- a/target/ppc/fpu_helper.c +++ b/target/ppc/fpu_helper.c @@ -699,11 +699,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; } |