Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/hppa/spmath - convert shift results into logical ex...



details:   https://anonhg.NetBSD.org/src/rev/c58746d6271e
branches:  trunk
changeset: 448620:c58746d6271e
user:      mrg <mrg%NetBSD.org@localhost>
date:      Wed Feb 06 05:04:41 2019 +0000

description:
- convert shift results into logical expressions

diffstat:

 sys/arch/hppa/spmath/cnv_float.h |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (33 lines):

diff -r 86c6255119a6 -r c58746d6271e sys/arch/hppa/spmath/cnv_float.h
--- a/sys/arch/hppa/spmath/cnv_float.h  Wed Feb 06 04:23:16 2019 +0000
+++ b/sys/arch/hppa/spmath/cnv_float.h  Wed Feb 06 05:04:41 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cnv_float.h,v 1.3 2008/04/06 08:03:36 skrll Exp $      */
+/*     $NetBSD: cnv_float.h,v 1.4 2019/02/06 05:04:41 mrg Exp $        */
 
 /*     $OpenBSD: cnv_float.h,v 1.5 2001/03/29 03:58:17 mickey Exp $    */
 
@@ -75,19 +75,19 @@
     ((exponent < (SGL_P - 1)) ?                                \
      (Sall(sgl_value) << (SGL_EXP_LENGTH + 1 + exponent)) : false)
 
-#define Int_isinexact_to_sgl(int_value)        (int_value << (33 - SGL_EXP_LENGTH))
+#define Int_isinexact_to_sgl(int_value)        ((int_value << (33 - SGL_EXP_LENGTH)) != 0)
 
 #define Sgl_roundnearest_from_int(int_value,sgl_value)                 \
     if (int_value & 1<<(SGL_EXP_LENGTH - 2))   /* round bit */         \
-       if ((int_value << (34 - SGL_EXP_LENGTH)) || Slow(sgl_value))    \
+       if (((int_value << (34 - SGL_EXP_LENGTH)) != 0) || Slow(sgl_value))     \
                Sall(sgl_value)++
 
 #define Dint_isinexact_to_sgl(dint_valueA,dint_valueB)         \
-    ((Dintp1(dint_valueA) << (33 - SGL_EXP_LENGTH)) || Dintp2(dint_valueB))
+    (((Dintp1(dint_valueA) << (33 - SGL_EXP_LENGTH)) != 0) || Dintp2(dint_valueB))
 
 #define Sgl_roundnearest_from_dint(dint_valueA,dint_valueB,sgl_value)  \
     if (Dintp1(dint_valueA) & 1<<(SGL_EXP_LENGTH - 2))                 \
-       if ((Dintp1(dint_valueA) << (34 - SGL_EXP_LENGTH)) ||           \
+       if (((Dintp1(dint_valueA) << (34 - SGL_EXP_LENGTH)) != 0) ||    \
        Dintp2(dint_valueB) || Slow(sgl_value)) Sall(sgl_value)++
 
 #define Dint_isinexact_to_dbl(dint_value)      \



Home | Main Index | Thread Index | Old Index