aboutsummaryrefslogtreecommitdiff
path: root/target/ppc
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
commit1348d20b168b83f9400cb2bb6fca769a3a7c12ec (patch)
tree63f12b6833f1d56c0b7ef3f5f0ed965bd03747d1 /target/ppc
parent6bce07777755b86e7ccc27c641c580bbc69bd4eb (diff)
target/ppc: Tidy inexact handling in do_fri
In GEN_FLOAT_B, we called helper_reset_fpstatus immediately before calling helper_fri*. Therefore get_float_exception_flags is known to be zero, and this code can be simplified. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20211119160502.17432-17-richard.henderson@linaro.org> Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'target/ppc')
-rw-r--r--target/ppc/fpu_helper.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/target/ppc/fpu_helper.c b/target/ppc/fpu_helper.c
index c3e0efe7c3..d4f72c296f 100644
--- a/target/ppc/fpu_helper.c
+++ b/target/ppc/fpu_helper.c
@@ -654,16 +654,12 @@ static uint64_t do_fri(CPUPPCState *env, uint64_t arg,
float_invalid_op_vxsnan(env, GETPC());
farg.ll = arg | 0x0008000000000000ULL;
} else {
- int inexact = get_float_exception_flags(&env->fp_status) &
- float_flag_inexact;
set_float_rounding_mode(rounding_mode, &env->fp_status);
farg.ll = float64_round_to_int(farg.d, &env->fp_status);
set_float_rounding_mode(old_rounding_mode, &env->fp_status);
/* fri* does not set FPSCR[XX] */
- if (!inexact) {
- env->fp_status.float_exception_flags &= ~float_flag_inexact;
- }
+ env->fp_status.float_exception_flags &= ~float_flag_inexact;
}
do_float_check_status(env, GETPC());
return farg.ll;