diff mbox series

[v2,18/27] target/m68k: Use floatX_silence_nan when we have already checked for SNaN

Message ID 20180512004311.9299-19-richard.henderson@linaro.org
State Superseded
Headers show
Series softfloat patch roundup | expand

Commit Message

Richard Henderson May 12, 2018, 12:43 a.m. UTC
Reviewed-by: Laurent Vivier <laurent@vivier.eu>

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

---
 target/m68k/softfloat.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.17.0

Comments

Peter Maydell May 14, 2018, 2:36 p.m. UTC | #1
On 12 May 2018 at 01:43, Richard Henderson <richard.henderson@linaro.org> wrote:
> Reviewed-by: Laurent Vivier <laurent@vivier.eu>

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

> ---

>  target/m68k/softfloat.c | 3 ++-

>  1 file changed, 2 insertions(+), 1 deletion(-)

>

> diff --git a/target/m68k/softfloat.c b/target/m68k/softfloat.c

> index e41b07d042..6ec227e20f 100644

> --- a/target/m68k/softfloat.c

> +++ b/target/m68k/softfloat.c

> @@ -31,13 +31,14 @@ static floatx80 propagateFloatx80NaNOneArg(floatx80 a, float_status *status)

>  {

>      if (floatx80_is_signaling_nan(a, status)) {

>          float_raise(float_flag_invalid, status);

> +        a = floatx80_silence_nan(a, status);

>      }

>

>      if (status->default_nan_mode) {

>          return floatx80_default_nan(status);

>      }

>

> -    return floatx80_maybe_silence_nan(a, status);

> +    return a;

>  }

>


Reviewed-by: Peter Maydell <peter.maydell@linaro.org>


thanks
-- PMM
diff mbox series

Patch

diff --git a/target/m68k/softfloat.c b/target/m68k/softfloat.c
index e41b07d042..6ec227e20f 100644
--- a/target/m68k/softfloat.c
+++ b/target/m68k/softfloat.c
@@ -31,13 +31,14 @@  static floatx80 propagateFloatx80NaNOneArg(floatx80 a, float_status *status)
 {
     if (floatx80_is_signaling_nan(a, status)) {
         float_raise(float_flag_invalid, status);
+        a = floatx80_silence_nan(a, status);
     }
 
     if (status->default_nan_mode) {
         return floatx80_default_nan(status);
     }
 
-    return floatx80_maybe_silence_nan(a, status);
+    return a;
 }
 
 /*----------------------------------------------------------------------------