[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 035/101] target/ppc: Tidy inexact handling in do_fri
From: |
Cédric Le Goater |
Subject: |
[PULL 035/101] target/ppc: Tidy inexact handling in do_fri |
Date: |
Thu, 16 Dec 2021 21:25:08 +0100 |
From: Richard Henderson <richard.henderson@linaro.org>
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>
---
target/ppc/fpu_helper.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/target/ppc/fpu_helper.c b/target/ppc/fpu_helper.c
index c3e0efe7c312..d4f72c296fad 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;
--
2.31.1
- [PULL 008/101] target/ppc: Implement Vector Mask Move insns, (continued)
- [PULL 008/101] target/ppc: Implement Vector Mask Move insns, Cédric Le Goater, 2021/12/16
- [PULL 018/101] docs: Rename ppc-spapr-hcalls.txt to ppc-spapr-hcalls.rst., Cédric Le Goater, 2021/12/16
- [PULL 015/101] ppc/pnv.c: fix "system-id" FDT when -uuid is set, Cédric Le Goater, 2021/12/16
- [PULL 020/101] softfloat: Extend float_exception_flags to 16 bits, Cédric Le Goater, 2021/12/16
- [PULL 031/101] target/ppc: Update float_invalid_cvt for new flags, Cédric Le Goater, 2021/12/16
- [PULL 013/101] ppc/pnv.c: add a friendly warning when accel=kvm is used, Cédric Le Goater, 2021/12/16
- [PULL 017/101] docs: rSTify ppc-spapr-hcalls.txt, Cédric Le Goater, 2021/12/16
- [PULL 039/101] target/ppc: Do not call do_float_check_status from do_fmadd, Cédric Le Goater, 2021/12/16
- [PULL 016/101] docs: Introducing pseries documentation., Cédric Le Goater, 2021/12/16
- [PULL 021/101] softfloat: Add flag specific to Inf - Inf, Cédric Le Goater, 2021/12/16
- [PULL 035/101] target/ppc: Tidy inexact handling in do_fri,
Cédric Le Goater <=
- [PULL 024/101] softfloat: Add flag specific to sqrt(-x), Cédric Le Goater, 2021/12/16
- [PULL 030/101] target/ppc: Move float_check_status from FPU_FCTI to translate, Cédric Le Goater, 2021/12/16
- [PULL 034/101] target/ppc: Use FloatRoundMode in do_fri, Cédric Le Goater, 2021/12/16
- [PULL 037/101] target/ppc: Update fmadd for new flags, Cédric Le Goater, 2021/12/16
- [PULL 029/101] target/ppc: Update float_invalid_op_div for new flags, Cédric Le Goater, 2021/12/16
- [PULL 033/101] target/ppc: Remove inline from do_fri, Cédric Le Goater, 2021/12/16
- [PULL 036/101] target/ppc: Clean up do_fri, Cédric Le Goater, 2021/12/16
- [PULL 056/101] target/ppc: Remove the software TLB model of 7450 CPUs, Cédric Le Goater, 2021/12/16
- [PULL 049/101] target/ppc: Add helpers for fadds, fsubs, fdivs, Cédric Le Goater, 2021/12/16
- [PULL 048/101] target/ppc: Add helper for fsqrts, Cédric Le Goater, 2021/12/16