All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL 0/4] softfloat patch queue
@ 2020-05-15 18:47 Richard Henderson
  2020-05-15 18:47 ` [PULL 1/4] softfloat: silence sNaN for conversions to/from floatx80 Richard Henderson
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Richard Henderson @ 2020-05-15 18:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell

I got distracted this week and never posted my follow-on
patches.  So flush the queue now and I'll post the other
patches for review soon.


r~


The following changes since commit 66706192de113c82ecf849f6943878c453b5d2ba:

  Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-tcg-plugins-150520-2' into staging (2020-05-15 15:47:47 +0100)

are available in the Git repository at:

  https://github.com/rth7680/qemu.git tags/pull-fpu-20200515

for you to fetch changes up to 9ecaf5ccec13ff2e8fe1e72f6e0f3367d2169c1c:

  softfloat: fix floatx80 pseudo-denormal round to integer (2020-05-15 11:04:50 -0700)

----------------------------------------------------------------
floatx80 x87 pseudo-denormal fixes

----------------------------------------------------------------
Joseph Myers (4):
      softfloat: silence sNaN for conversions to/from floatx80
      softfloat: fix floatx80 pseudo-denormal addition / subtraction
      softfloat: fix floatx80 pseudo-denormal comparisons
      softfloat: fix floatx80 pseudo-denormal round to integer

 fpu/softfloat.c                            | 39 ++++++++++++++----
 tests/tcg/i386/test-i386-pseudo-denormal.c | 38 ++++++++++++++++++
 tests/tcg/i386/test-i386-snan-convert.c    | 63 ++++++++++++++++++++++++++++++
 3 files changed, 133 insertions(+), 7 deletions(-)
 create mode 100644 tests/tcg/i386/test-i386-pseudo-denormal.c
 create mode 100644 tests/tcg/i386/test-i386-snan-convert.c


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PULL 1/4] softfloat: silence sNaN for conversions to/from floatx80
  2020-05-15 18:47 [PULL 0/4] softfloat patch queue Richard Henderson
@ 2020-05-15 18:47 ` Richard Henderson
  2020-05-15 18:47 ` [PULL 2/4] softfloat: fix floatx80 pseudo-denormal addition / subtraction Richard Henderson
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Richard Henderson @ 2020-05-15 18:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Joseph Myers

From: Joseph Myers <joseph@codesourcery.com>

Conversions between IEEE floating-point formats should convert
signaling NaNs to quiet NaNs.  Most of those in QEMU's softfloat code
do so, but those for floatx80 fail to.  Fix those conversions to
silence signaling NaNs as well.

Signed-off-by: Joseph Myers <joseph@codesourcery.com>
Message-Id: <alpine.DEB.2.21.2005042336170.22972@digraph.polyomino.org.uk>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 fpu/softfloat.c                         | 24 +++++++---
 tests/tcg/i386/test-i386-snan-convert.c | 63 +++++++++++++++++++++++++
 2 files changed, 81 insertions(+), 6 deletions(-)
 create mode 100644 tests/tcg/i386/test-i386-snan-convert.c

diff --git a/fpu/softfloat.c b/fpu/softfloat.c
index ae6ba71854..ac116c70b8 100644
--- a/fpu/softfloat.c
+++ b/fpu/softfloat.c
@@ -4498,7 +4498,9 @@ floatx80 float32_to_floatx80(float32 a, float_status *status)
     aSign = extractFloat32Sign( a );
     if ( aExp == 0xFF ) {
         if (aSig) {
-            return commonNaNToFloatx80(float32ToCommonNaN(a, status), status);
+            floatx80 res = commonNaNToFloatx80(float32ToCommonNaN(a, status),
+                                               status);
+            return floatx80_silence_nan(res, status);
         }
         return packFloatx80(aSign,
                             floatx80_infinity_high,
@@ -5016,7 +5018,9 @@ floatx80 float64_to_floatx80(float64 a, float_status *status)
     aSign = extractFloat64Sign( a );
     if ( aExp == 0x7FF ) {
         if (aSig) {
-            return commonNaNToFloatx80(float64ToCommonNaN(a, status), status);
+            floatx80 res = commonNaNToFloatx80(float64ToCommonNaN(a, status),
+                                               status);
+            return floatx80_silence_nan(res, status);
         }
         return packFloatx80(aSign,
                             floatx80_infinity_high,
@@ -5618,7 +5622,9 @@ float32 floatx80_to_float32(floatx80 a, float_status *status)
     aSign = extractFloatx80Sign( a );
     if ( aExp == 0x7FFF ) {
         if ( (uint64_t) ( aSig<<1 ) ) {
-            return commonNaNToFloat32(floatx80ToCommonNaN(a, status), status);
+            float32 res = commonNaNToFloat32(floatx80ToCommonNaN(a, status),
+                                             status);
+            return float32_silence_nan(res, status);
         }
         return packFloat32( aSign, 0xFF, 0 );
     }
@@ -5650,7 +5656,9 @@ float64 floatx80_to_float64(floatx80 a, float_status *status)
     aSign = extractFloatx80Sign( a );
     if ( aExp == 0x7FFF ) {
         if ( (uint64_t) ( aSig<<1 ) ) {
-            return commonNaNToFloat64(floatx80ToCommonNaN(a, status), status);
+            float64 res = commonNaNToFloat64(floatx80ToCommonNaN(a, status),
+                                             status);
+            return float64_silence_nan(res, status);
         }
         return packFloat64( aSign, 0x7FF, 0 );
     }
@@ -5681,7 +5689,9 @@ float128 floatx80_to_float128(floatx80 a, float_status *status)
     aExp = extractFloatx80Exp( a );
     aSign = extractFloatx80Sign( a );
     if ( ( aExp == 0x7FFF ) && (uint64_t) ( aSig<<1 ) ) {
-        return commonNaNToFloat128(floatx80ToCommonNaN(a, status), status);
+        float128 res = commonNaNToFloat128(floatx80ToCommonNaN(a, status),
+                                           status);
+        return float128_silence_nan(res, status);
     }
     shift128Right( aSig<<1, 0, 16, &zSig0, &zSig1 );
     return packFloat128( aSign, aExp, zSig0, zSig1 );
@@ -6959,7 +6969,9 @@ floatx80 float128_to_floatx80(float128 a, float_status *status)
     aSign = extractFloat128Sign( a );
     if ( aExp == 0x7FFF ) {
         if ( aSig0 | aSig1 ) {
-            return commonNaNToFloatx80(float128ToCommonNaN(a, status), status);
+            floatx80 res = commonNaNToFloatx80(float128ToCommonNaN(a, status),
+                                               status);
+            return floatx80_silence_nan(res, status);
         }
         return packFloatx80(aSign, floatx80_infinity_high,
                                    floatx80_infinity_low);
diff --git a/tests/tcg/i386/test-i386-snan-convert.c b/tests/tcg/i386/test-i386-snan-convert.c
new file mode 100644
index 0000000000..ed6d535ce2
--- /dev/null
+++ b/tests/tcg/i386/test-i386-snan-convert.c
@@ -0,0 +1,63 @@
+/* Test conversions of signaling NaNs to and from long double.  */
+
+#include <stdint.h>
+#include <stdio.h>
+
+volatile float f_res;
+volatile double d_res;
+volatile long double ld_res;
+
+volatile float f_snan = __builtin_nansf("");
+volatile double d_snan = __builtin_nans("");
+volatile long double ld_snan = __builtin_nansl("");
+
+int issignaling_f(float x)
+{
+    union { float f; uint32_t u; } u = { .f = x };
+    return (u.u & 0x7fffffff) > 0x7f800000 && (u.u & 0x400000) == 0;
+}
+
+int issignaling_d(double x)
+{
+    union { double d; uint64_t u; } u = { .d = x };
+    return (((u.u & UINT64_C(0x7fffffffffffffff)) >
+            UINT64_C(0x7ff0000000000000)) &&
+            (u.u & UINT64_C(0x8000000000000)) == 0);
+}
+
+int issignaling_ld(long double x)
+{
+    union {
+        long double ld;
+        struct { uint64_t sig; uint16_t sign_exp; } s;
+    } u = { .ld = x };
+    return ((u.s.sign_exp & 0x7fff) == 0x7fff &&
+            (u.s.sig >> 63) != 0 &&
+            (u.s.sig & UINT64_C(0x4000000000000000)) == 0);
+}
+
+int main(void)
+{
+    int ret = 0;
+    ld_res = f_snan;
+    if (issignaling_ld(ld_res)) {
+        printf("FAIL: float -> long double\n");
+        ret = 1;
+    }
+    ld_res = d_snan;
+    if (issignaling_ld(ld_res)) {
+        printf("FAIL: double -> long double\n");
+        ret = 1;
+    }
+    f_res = ld_snan;
+    if (issignaling_d(f_res)) {
+        printf("FAIL: long double -> float\n");
+        ret = 1;
+    }
+    d_res = ld_snan;
+    if (issignaling_d(d_res)) {
+        printf("FAIL: long double -> double\n");
+        ret = 1;
+    }
+    return ret;
+}
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PULL 2/4] softfloat: fix floatx80 pseudo-denormal addition / subtraction
  2020-05-15 18:47 [PULL 0/4] softfloat patch queue Richard Henderson
  2020-05-15 18:47 ` [PULL 1/4] softfloat: silence sNaN for conversions to/from floatx80 Richard Henderson
@ 2020-05-15 18:47 ` Richard Henderson
  2020-05-15 18:47 ` [PULL 3/4] softfloat: fix floatx80 pseudo-denormal comparisons Richard Henderson
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Richard Henderson @ 2020-05-15 18:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Joseph Myers

From: Joseph Myers <joseph@codesourcery.com>

The softfloat function addFloatx80Sigs, used for addition of values
with the same sign and subtraction of values with opposite sign, fails
to handle the case where the two values both have biased exponent zero
and there is a carry resulting from adding the significands, which can
occur if one or both values are pseudo-denormals (biased exponent
zero, explicit integer bit 1).  Add a check for that case, so making
the results match those seen on x86 hardware for pseudo-denormals.

Signed-off-by: Joseph Myers <joseph@codesourcery.com>
Message-Id: <alpine.DEB.2.21.2005042337570.22972@digraph.polyomino.org.uk>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 fpu/softfloat.c                            |  6 ++++++
 tests/tcg/i386/test-i386-pseudo-denormal.c | 24 ++++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 tests/tcg/i386/test-i386-pseudo-denormal.c

diff --git a/fpu/softfloat.c b/fpu/softfloat.c
index ac116c70b8..6094d267b5 100644
--- a/fpu/softfloat.c
+++ b/fpu/softfloat.c
@@ -5866,6 +5866,12 @@ static floatx80 addFloatx80Sigs(floatx80 a, floatx80 b, flag zSign,
         zSig1 = 0;
         zSig0 = aSig + bSig;
         if ( aExp == 0 ) {
+            if ((aSig | bSig) & UINT64_C(0x8000000000000000) && zSig0 < aSig) {
+                /* At least one of the values is a pseudo-denormal,
+                 * and there is a carry out of the result.  */
+                zExp = 1;
+                goto shiftRight1;
+            }
             if (zSig0 == 0) {
                 return packFloatx80(zSign, 0, 0);
             }
diff --git a/tests/tcg/i386/test-i386-pseudo-denormal.c b/tests/tcg/i386/test-i386-pseudo-denormal.c
new file mode 100644
index 0000000000..cfa2a500b0
--- /dev/null
+++ b/tests/tcg/i386/test-i386-pseudo-denormal.c
@@ -0,0 +1,24 @@
+/* Test pseudo-denormal operations.  */
+
+#include <stdint.h>
+#include <stdio.h>
+
+union u {
+    struct { uint64_t sig; uint16_t sign_exp; } s;
+    long double ld;
+};
+
+volatile union u ld_pseudo_m16382 = { .s = { UINT64_C(1) << 63, 0 } };
+
+volatile long double ld_res;
+
+int main(void)
+{
+    int ret = 0;
+    ld_res = ld_pseudo_m16382.ld + ld_pseudo_m16382.ld;
+    if (ld_res != 0x1p-16381L) {
+        printf("FAIL: pseudo-denormal add\n");
+        ret = 1;
+    }
+    return ret;
+}
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PULL 3/4] softfloat: fix floatx80 pseudo-denormal comparisons
  2020-05-15 18:47 [PULL 0/4] softfloat patch queue Richard Henderson
  2020-05-15 18:47 ` [PULL 1/4] softfloat: silence sNaN for conversions to/from floatx80 Richard Henderson
  2020-05-15 18:47 ` [PULL 2/4] softfloat: fix floatx80 pseudo-denormal addition / subtraction Richard Henderson
@ 2020-05-15 18:47 ` Richard Henderson
  2020-05-15 18:47 ` [PULL 4/4] softfloat: fix floatx80 pseudo-denormal round to integer Richard Henderson
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Richard Henderson @ 2020-05-15 18:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Joseph Myers

From: Joseph Myers <joseph@codesourcery.com>

The softfloat floatx80 comparisons fail to allow for pseudo-denormals,
which should compare equal to corresponding values with biased
exponent 1 rather than 0.  Add an adjustment for that case when
comparing numbers with the same sign.

Signed-off-by: Joseph Myers <joseph@codesourcery.com>
Message-Id: <alpine.DEB.2.21.2005042338470.22972@digraph.polyomino.org.uk>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 fpu/softfloat.c                            | 7 +++++++
 tests/tcg/i386/test-i386-pseudo-denormal.c | 4 ++++
 2 files changed, 11 insertions(+)

diff --git a/fpu/softfloat.c b/fpu/softfloat.c
index 6094d267b5..c57f72e3a6 100644
--- a/fpu/softfloat.c
+++ b/fpu/softfloat.c
@@ -7966,6 +7966,13 @@ static inline int floatx80_compare_internal(floatx80 a, floatx80 b,
             return 1 - (2 * aSign);
         }
     } else {
+        /* Normalize pseudo-denormals before comparison.  */
+        if ((a.high & 0x7fff) == 0 && a.low & UINT64_C(0x8000000000000000)) {
+            ++a.high;
+        }
+        if ((b.high & 0x7fff) == 0 && b.low & UINT64_C(0x8000000000000000)) {
+            ++b.high;
+        }
         if (a.low == b.low && a.high == b.high) {
             return float_relation_equal;
         } else {
diff --git a/tests/tcg/i386/test-i386-pseudo-denormal.c b/tests/tcg/i386/test-i386-pseudo-denormal.c
index cfa2a500b0..acf2b9cf03 100644
--- a/tests/tcg/i386/test-i386-pseudo-denormal.c
+++ b/tests/tcg/i386/test-i386-pseudo-denormal.c
@@ -20,5 +20,9 @@ int main(void)
         printf("FAIL: pseudo-denormal add\n");
         ret = 1;
     }
+    if (ld_pseudo_m16382.ld != 0x1p-16382L) {
+        printf("FAIL: pseudo-denormal compare\n");
+        ret = 1;
+    }
     return ret;
 }
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PULL 4/4] softfloat: fix floatx80 pseudo-denormal round to integer
  2020-05-15 18:47 [PULL 0/4] softfloat patch queue Richard Henderson
                   ` (2 preceding siblings ...)
  2020-05-15 18:47 ` [PULL 3/4] softfloat: fix floatx80 pseudo-denormal comparisons Richard Henderson
@ 2020-05-15 18:47 ` Richard Henderson
  2020-05-15 21:31 ` [PULL 0/4] softfloat patch queue Peter Maydell
  2020-05-16  5:46 ` no-reply
  5 siblings, 0 replies; 7+ messages in thread
From: Richard Henderson @ 2020-05-15 18:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Joseph Myers

From: Joseph Myers <joseph@codesourcery.com>

The softfloat function floatx80_round_to_int incorrectly handles the
case of a pseudo-denormal where only the high bit of the significand
is set, ignoring that bit (treating the number as an exact zero)
rather than treating the number as an alternative representation of
+/- 2^-16382 (which may round to +/- 1 depending on the rounding mode)
as hardware does.  Fix this check (simplifying the code in the
process).

Signed-off-by: Joseph Myers <joseph@codesourcery.com>
Message-Id: <alpine.DEB.2.21.2005042339420.22972@digraph.polyomino.org.uk>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 fpu/softfloat.c                            |  2 +-
 tests/tcg/i386/test-i386-pseudo-denormal.c | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/fpu/softfloat.c b/fpu/softfloat.c
index c57f72e3a6..a362bf89ca 100644
--- a/fpu/softfloat.c
+++ b/fpu/softfloat.c
@@ -5741,7 +5741,7 @@ floatx80 floatx80_round_to_int(floatx80 a, float_status *status)
     }
     if ( aExp < 0x3FFF ) {
         if (    ( aExp == 0 )
-             && ( (uint64_t) ( extractFloatx80Frac( a )<<1 ) == 0 ) ) {
+             && ( (uint64_t) ( extractFloatx80Frac( a ) ) == 0 ) ) {
             return a;
         }
         status->float_exception_flags |= float_flag_inexact;
diff --git a/tests/tcg/i386/test-i386-pseudo-denormal.c b/tests/tcg/i386/test-i386-pseudo-denormal.c
index acf2b9cf03..00d510cf4a 100644
--- a/tests/tcg/i386/test-i386-pseudo-denormal.c
+++ b/tests/tcg/i386/test-i386-pseudo-denormal.c
@@ -14,6 +14,7 @@ volatile long double ld_res;
 
 int main(void)
 {
+    short cw;
     int ret = 0;
     ld_res = ld_pseudo_m16382.ld + ld_pseudo_m16382.ld;
     if (ld_res != 0x1p-16381L) {
@@ -24,5 +25,14 @@ int main(void)
         printf("FAIL: pseudo-denormal compare\n");
         ret = 1;
     }
+    /* Set round-upward.  */
+    __asm__ volatile ("fnstcw %0" : "=m" (cw));
+    cw = (cw & ~0xc00) | 0x800;
+    __asm__ volatile ("fldcw %0" : : "m" (cw));
+    __asm__ ("frndint" : "=t" (ld_res) : "0" (ld_pseudo_m16382.ld));
+    if (ld_res != 1.0L) {
+        printf("FAIL: pseudo-denormal round-to-integer\n");
+        ret = 1;
+    }
     return ret;
 }
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PULL 0/4] softfloat patch queue
  2020-05-15 18:47 [PULL 0/4] softfloat patch queue Richard Henderson
                   ` (3 preceding siblings ...)
  2020-05-15 18:47 ` [PULL 4/4] softfloat: fix floatx80 pseudo-denormal round to integer Richard Henderson
@ 2020-05-15 21:31 ` Peter Maydell
  2020-05-16  5:46 ` no-reply
  5 siblings, 0 replies; 7+ messages in thread
From: Peter Maydell @ 2020-05-15 21:31 UTC (permalink / raw)
  To: Richard Henderson; +Cc: QEMU Developers

On Fri, 15 May 2020 at 19:47, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> I got distracted this week and never posted my follow-on
> patches.  So flush the queue now and I'll post the other
> patches for review soon.
>
>
> r~
>
>
> The following changes since commit 66706192de113c82ecf849f6943878c453b5d2ba:
>
>   Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-tcg-plugins-150520-2' into staging (2020-05-15 15:47:47 +0100)
>
> are available in the Git repository at:
>
>   https://github.com/rth7680/qemu.git tags/pull-fpu-20200515
>
> for you to fetch changes up to 9ecaf5ccec13ff2e8fe1e72f6e0f3367d2169c1c:
>
>   softfloat: fix floatx80 pseudo-denormal round to integer (2020-05-15 11:04:50 -0700)
>
> ----------------------------------------------------------------
> floatx80 x87 pseudo-denormal fixes
>


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/5.1
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PULL 0/4] softfloat patch queue
  2020-05-15 18:47 [PULL 0/4] softfloat patch queue Richard Henderson
                   ` (4 preceding siblings ...)
  2020-05-15 21:31 ` [PULL 0/4] softfloat patch queue Peter Maydell
@ 2020-05-16  5:46 ` no-reply
  5 siblings, 0 replies; 7+ messages in thread
From: no-reply @ 2020-05-16  5:46 UTC (permalink / raw)
  To: richard.henderson; +Cc: peter.maydell, qemu-devel

Patchew URL: https://patchew.org/QEMU/20200515184722.31182-1-richard.henderson@linaro.org/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Message-id: 20200515184722.31182-1-richard.henderson@linaro.org
Subject: [PULL 0/4] softfloat patch queue
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 - [tag update]      patchew/20200515190153.6017-1-richard.henderson@linaro.org -> patchew/20200515190153.6017-1-richard.henderson@linaro.org
Switched to a new branch 'test'
36efd04 softfloat: fix floatx80 pseudo-denormal round to integer
4c2e880 softfloat: fix floatx80 pseudo-denormal comparisons
013fb4d softfloat: fix floatx80 pseudo-denormal addition / subtraction
f1a96f5 softfloat: silence sNaN for conversions to/from floatx80

=== OUTPUT BEGIN ===
1/4 Checking commit f1a96f5122b8 (softfloat: silence sNaN for conversions to/from floatx80)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#88: 
new file mode 100644

ERROR: Use of volatile is usually wrong, please add a comment
#98: FILE: tests/tcg/i386/test-i386-snan-convert.c:6:
+volatile float f_res;

ERROR: Use of volatile is usually wrong, please add a comment
#99: FILE: tests/tcg/i386/test-i386-snan-convert.c:7:
+volatile double d_res;

ERROR: Use of volatile is usually wrong, please add a comment
#100: FILE: tests/tcg/i386/test-i386-snan-convert.c:8:
+volatile long double ld_res;

ERROR: Use of volatile is usually wrong, please add a comment
#102: FILE: tests/tcg/i386/test-i386-snan-convert.c:10:
+volatile float f_snan = __builtin_nansf("");

ERROR: Use of volatile is usually wrong, please add a comment
#103: FILE: tests/tcg/i386/test-i386-snan-convert.c:11:
+volatile double d_snan = __builtin_nans("");

ERROR: Use of volatile is usually wrong, please add a comment
#104: FILE: tests/tcg/i386/test-i386-snan-convert.c:12:
+volatile long double ld_snan = __builtin_nansl("");

total: 6 errors, 1 warnings, 123 lines checked

Patch 1/4 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

2/4 Checking commit 013fb4df5f1b (softfloat: fix floatx80 pseudo-denormal addition / subtraction)
WARNING: Block comments use a leading /* on a separate line
#29: FILE: fpu/softfloat.c:5870:
+                /* At least one of the values is a pseudo-denormal,

WARNING: Block comments use a trailing */ on a separate line
#30: FILE: fpu/softfloat.c:5871:
+                 * and there is a carry out of the result.  */

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#38: 
new file mode 100644

ERROR: Use of volatile is usually wrong, please add a comment
#53: FILE: tests/tcg/i386/test-i386-pseudo-denormal.c:11:
+volatile union u ld_pseudo_m16382 = { .s = { UINT64_C(1) << 63, 0 } };

ERROR: Use of volatile is usually wrong, please add a comment
#55: FILE: tests/tcg/i386/test-i386-pseudo-denormal.c:13:
+volatile long double ld_res;

ERROR: spaces required around that '-' (ctx:VxV)
#61: FILE: tests/tcg/i386/test-i386-pseudo-denormal.c:19:
+    if (ld_res != 0x1p-16381L) {
                       ^

total: 3 errors, 3 warnings, 36 lines checked

Patch 2/4 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

3/4 Checking commit 4c2e8807fd1f (softfloat: fix floatx80 pseudo-denormal comparisons)
ERROR: spaces required around that '-' (ctx:VxV)
#43: FILE: tests/tcg/i386/test-i386-pseudo-denormal.c:23:
+    if (ld_pseudo_m16382.ld != 0x1p-16382L) {
                                    ^

total: 1 errors, 0 warnings, 22 lines checked

Patch 3/4 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

4/4 Checking commit 36efd04e9c7b (softfloat: fix floatx80 pseudo-denormal round to integer)
ERROR: space prohibited after that open parenthesis '('
#29: FILE: fpu/softfloat.c:5744:
+             && ( (uint64_t) ( extractFloatx80Frac( a ) ) == 0 ) ) {

ERROR: space prohibited before that close parenthesis ')'
#29: FILE: fpu/softfloat.c:5744:
+             && ( (uint64_t) ( extractFloatx80Frac( a ) ) == 0 ) ) {

total: 2 errors, 0 warnings, 29 lines checked

Patch 4/4 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20200515184722.31182-1-richard.henderson@linaro.org/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-05-16  5:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-15 18:47 [PULL 0/4] softfloat patch queue Richard Henderson
2020-05-15 18:47 ` [PULL 1/4] softfloat: silence sNaN for conversions to/from floatx80 Richard Henderson
2020-05-15 18:47 ` [PULL 2/4] softfloat: fix floatx80 pseudo-denormal addition / subtraction Richard Henderson
2020-05-15 18:47 ` [PULL 3/4] softfloat: fix floatx80 pseudo-denormal comparisons Richard Henderson
2020-05-15 18:47 ` [PULL 4/4] softfloat: fix floatx80 pseudo-denormal round to integer Richard Henderson
2020-05-15 21:31 ` [PULL 0/4] softfloat patch queue Peter Maydell
2020-05-16  5:46 ` no-reply

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.