diff mbox series

[10/11] target/mips: Do not check MSACSR_FS_MASK in update_msacsr

Message ID 20210527041405.391567-11-richard.henderson@linaro.org
State New
Headers show
Series softfloat: Improve denormal handling | expand

Commit Message

Richard Henderson May 27, 2021, 4:14 a.m. UTC
The FS_MASK has already been taken into account with
restore_msa_fp_status.  The definition of iflush and
oflush is that we *have* flushed to zero.

Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

---
 target/mips/tcg/msa_helper.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

-- 
2.25.1

Comments

Philippe Mathieu-Daudé June 19, 2021, 3:15 p.m. UTC | #1
On 5/27/21 6:14 AM, Richard Henderson wrote:
> The FS_MASK has already been taken into account with

> restore_msa_fp_status.  The definition of iflush and

> oflush is that we *have* flushed to zero.

> 

> Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>

> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

> ---

>  target/mips/tcg/msa_helper.c | 6 ++----

>  1 file changed, 2 insertions(+), 4 deletions(-)


Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
diff mbox series

Patch

diff --git a/target/mips/tcg/msa_helper.c b/target/mips/tcg/msa_helper.c
index 2f89abe166..ffe6e630ed 100644
--- a/target/mips/tcg/msa_helper.c
+++ b/target/mips/tcg/msa_helper.c
@@ -6225,8 +6225,7 @@  static int update_msacsr(CPUMIPSState *env, int action, int denormal)
     enable = GET_FP_ENABLE(env->active_tc.msacsr) | FP_UNIMPLEMENTED;
 
     /* Set Inexact (I) when flushing inputs to zero */
-    if ((ieee_exception_flags & float_flag_iflush_denormal) &&
-            (env->active_tc.msacsr & MSACSR_FS_MASK) != 0) {
+    if (ieee_exception_flags & float_flag_iflush_denormal) {
         if (action & CLEAR_IS_INEXACT) {
             mips_exception_flags &= ~FP_INEXACT;
         } else {
@@ -6235,8 +6234,7 @@  static int update_msacsr(CPUMIPSState *env, int action, int denormal)
     }
 
     /* Set Inexact (I) and Underflow (U) when flushing outputs to zero */
-    if ((ieee_exception_flags & float_flag_oflush_denormal) &&
-            (env->active_tc.msacsr & MSACSR_FS_MASK) != 0) {
+    if (ieee_exception_flags & float_flag_oflush_denormal) {
         mips_exception_flags |= FP_INEXACT;
         if (action & CLEAR_FS_UNDERFLOW) {
             mips_exception_flags &= ~FP_UNDERFLOW;