public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] MIPS/glibc: soft-fp NaN representation corrections
@ 2013-04-24 17:40 Maciej W. Rozycki
  2013-04-24 21:24 ` Joseph S. Myers
  0 siblings, 1 reply; 8+ messages in thread
From: Maciej W. Rozycki @ 2013-04-24 17:40 UTC (permalink / raw)
  To: libc-alpha; +Cc: libc-ports

Hi,

 Unlike many platforms traditional MIPS targets interpret the quiet bit of 
NaN data in the inverse way, a NaN is quiet whenever the bit is clear.  
Additionally the canonical qNaN encoding has all the payload bits set 
rather than clear.  The quiet bit convention is however currently not 
respected by our soft-fp implementation.  Here's a suitable change to 
correct it.

 The changes are extensive, however the only use by the MIPS target within 
glibc is sqrtl on the new ABIs (I have an outstanding change to make GCC's 
copy of soft-fp used in a more extensive manner though).  I have manually 
verified that this change has the desired effect on that function, both 
with the n64 and the n32 ABI and both endiannesses each.  The o32 version 
of sfp-machine.h appears unused, however I changed it for correctness 
regardless (perhaps the file should be dropped).

 For the sake of readability and ease of maintenance I decided to factor 
out both raw (_FP_FRAC_SNANP, _FP_SETQNAN) and semi-raw 
(_FP_FRAC_SNANP_SEMIRAW, _FP_SETQNAN_SEMIRAW) macros even though the 
latters are only used once each.

 These changes touch generic code, for the most part.  They are supposed 
not to affect targets other than MIPS, however I think it would make sense 
to test them at least on a selection of other targets glibc supports.  
However I am not familiar enough with other targets to know how much 
soft-fp is used across them; also I think automatic testing may have a 
better value than manually poking at a function or three.  I will 
therefore appreciate ideas as to how to test these changes, or any other 
help with that indeed.

 Otherwise, do these changes look OK?

2013-04-24  Maciej W. Rozycki  <macro@codesourcery.com>

	/
	* soft-fp/op-common.h (_FP_FRAC_SNANP): New macro.
	(_FP_FRAC_SNANP_SEMIRAW): Likewise.
	(_FP_UNPACK_CANONICAL): Use _FP_FRAC_SNANP.
	(_FP_CHECK_SIGNAN_SEMIRAW): Use _FP_FRAC_SNANP_SEMIRAW.
	(_FP_SETQNAN): New macro.
	(_FP_SETQNAN_SEMIRAW): Likewise.
	(_FP_PACK_SEMIRAW): Use _FP_SETQNAN.
	(_FP_PACK_CANONICAL): Use _FP_SETQNAN.
	(_FP_ISSIGNAN): Use _FP_FRAC_SNANP.
	(FP_EXTEND): Use _FP_FRAC_SNANP.
	(FP_TRUNC): Use _FP_SETQNAN_SEMIRAW.
	* soft-fp/testit.c (gen_special_double): Take _FP_QNANNEGATEDP
	into account.
	* sysdeps/sparc/sparc32/soft-fp/sfp-machine.h (_FP_QNANNEGATEDP):
	New macro.
	* sysdeps/sparc/sparc64/soft-fp/sfp-machine.h (_FP_QNANNEGATEDP):
	Likewise.

	ports/
	* sysdeps/mips/mips64/soft-fp/sfp-machine.h (_FP_QNANNEGATEDP):
	New macro.
	(_FP_NANFRAC_S): Don't set the quiet bit.
	(_FP_NANFRAC_D): Likewise.
	(_FP_NANFRAC_Q): Likewise.
	* sysdeps/mips/soft-fp/sfp-machine.h (_FP_QNANNEGATEDP): New
	macro.
	(_FP_NANFRAC_S): Don't set the quiet bit.
	(_FP_NANFRAC_D): Likewise.
	(_FP_NANFRAC_Q): Likewise.
	* sysdeps/aarch64/soft-fp/sfp-machine.h (_FP_QNANNEGATEDP): New 
	macro.
	* sysdeps/alpha/soft-fp/sfp-machine.h (_FP_QNANNEGATEDP): 
	Likewise.
	* sysdeps/powerpc/soft-fp/sfp-machine.h (_FP_QNANNEGATEDP): New
	macro.

  Maciej

glibc-mips-soft-fp-nan.diff
Index: glibc-fsf-trunk-quilt/ports/sysdeps/aarch64/soft-fp/sfp-machine.h
===================================================================
--- glibc-fsf-trunk-quilt.orig/ports/sysdeps/aarch64/soft-fp/sfp-machine.h	2013-04-23 00:28:50.097012113 +0100
+++ glibc-fsf-trunk-quilt/ports/sysdeps/aarch64/soft-fp/sfp-machine.h	2013-04-23 00:33:47.108144185 +0100
@@ -25,6 +25,8 @@
 #define _FP_NANSIGN_Q		0
 
 #define _FP_KEEPNANFRACP 1
+#define _FP_QNANNEGATEDP 0
+
 /* From my experiments it seems X is chosen unless one of the
    NaNs is sNaN,  in which case the result is NANSIGN/NANFRAC.  */
 #define _FP_CHOOSENAN(fs, wc, R, X, Y, OP)			\
Index: glibc-fsf-trunk-quilt/ports/sysdeps/alpha/soft-fp/sfp-machine.h
===================================================================
--- glibc-fsf-trunk-quilt.orig/ports/sysdeps/alpha/soft-fp/sfp-machine.h	2013-04-23 00:28:50.097012113 +0100
+++ glibc-fsf-trunk-quilt/ports/sysdeps/alpha/soft-fp/sfp-machine.h	2013-04-23 00:33:47.108144185 +0100
@@ -46,6 +46,7 @@
 #define _FP_NANSIGN_Q		0
 
 #define _FP_KEEPNANFRACP 1
+#define _FP_QNANNEGATEDP 0
 
 /* Alpha Architecture Handbook, 4.7.10.4 sez that we should prefer any
    type of NaN in Fb, then Fa.  */
Index: glibc-fsf-trunk-quilt/ports/sysdeps/mips/mips64/soft-fp/sfp-machine.h
===================================================================
--- glibc-fsf-trunk-quilt.orig/ports/sysdeps/mips/mips64/soft-fp/sfp-machine.h	2013-04-23 00:28:50.097012113 +0100
+++ glibc-fsf-trunk-quilt/ports/sysdeps/mips/mips64/soft-fp/sfp-machine.h	2013-04-23 00:33:47.108144185 +0100
@@ -17,14 +17,16 @@
 #define _FP_DIV_MEAT_D(R,X,Y)	_FP_DIV_MEAT_1_udiv_norm(D,R,X,Y)
 #define _FP_DIV_MEAT_Q(R,X,Y)	_FP_DIV_MEAT_2_udiv(Q,R,X,Y)
 
-#define _FP_NANFRAC_S		((_FP_QNANBIT_S << 1) - 1)
-#define _FP_NANFRAC_D		((_FP_QNANBIT_D << 1) - 1)
-#define _FP_NANFRAC_Q		((_FP_QNANBIT_Q << 1) - 1), -1
+#define _FP_NANFRAC_S		(_FP_QNANBIT_S - 1)
+#define _FP_NANFRAC_D		(_FP_QNANBIT_D - 1)
+#define _FP_NANFRAC_Q		(_FP_QNANBIT_Q - 1), -1
 #define _FP_NANSIGN_S		0
 #define _FP_NANSIGN_D		0
 #define _FP_NANSIGN_Q		0
 
 #define _FP_KEEPNANFRACP 1
+#define _FP_QNANNEGATEDP 1
+
 /* From my experiments it seems X is chosen unless one of the
    NaNs is sNaN,  in which case the result is NANSIGN/NANFRAC.  */
 #define _FP_CHOOSENAN(fs, wc, R, X, Y, OP)			\
Index: glibc-fsf-trunk-quilt/ports/sysdeps/mips/soft-fp/sfp-machine.h
===================================================================
--- glibc-fsf-trunk-quilt.orig/ports/sysdeps/mips/soft-fp/sfp-machine.h	2013-04-23 00:28:50.097012113 +0100
+++ glibc-fsf-trunk-quilt/ports/sysdeps/mips/soft-fp/sfp-machine.h	2013-04-23 00:33:47.108144185 +0100
@@ -14,14 +14,16 @@
 #define _FP_DIV_MEAT_D(R,X,Y)	_FP_DIV_MEAT_2_udiv(D,R,X,Y)
 #define _FP_DIV_MEAT_Q(R,X,Y)	_FP_DIV_MEAT_4_udiv(Q,R,X,Y)
 
-#define _FP_NANFRAC_S		((_FP_QNANBIT_S << 1) - 1)
-#define _FP_NANFRAC_D		((_FP_QNANBIT_D << 1) - 1), -1
-#define _FP_NANFRAC_Q		((_FP_QNANBIT_Q << 1) - 1), -1, -1, -1
+#define _FP_NANFRAC_S		(_FP_QNANBIT_S - 1)
+#define _FP_NANFRAC_D		(_FP_QNANBIT_D - 1), -1
+#define _FP_NANFRAC_Q		(_FP_QNANBIT_Q - 1), -1, -1, -1
 #define _FP_NANSIGN_S		0
 #define _FP_NANSIGN_D		0
 #define _FP_NANSIGN_Q		0
 
 #define _FP_KEEPNANFRACP 1
+#define _FP_QNANNEGATEDP 1
+
 /* From my experiments it seems X is chosen unless one of the
    NaNs is sNaN,  in which case the result is NANSIGN/NANFRAC.  */
 #define _FP_CHOOSENAN(fs, wc, R, X, Y, OP)			\
Index: glibc-fsf-trunk-quilt/ports/sysdeps/powerpc/soft-fp/sfp-machine.h
===================================================================
--- glibc-fsf-trunk-quilt.orig/ports/sysdeps/powerpc/soft-fp/sfp-machine.h	2013-04-23 00:28:50.097012113 +0100
+++ glibc-fsf-trunk-quilt/ports/sysdeps/powerpc/soft-fp/sfp-machine.h	2013-04-23 00:33:47.108144185 +0100
@@ -22,6 +22,7 @@
 #define _FP_NANSIGN_Q		0
 
 #define _FP_KEEPNANFRACP 1
+#define _FP_QNANNEGATEDP 0
 
 /* Someone please check this.  */
 #define _FP_CHOOSENAN(fs, wc, R, X, Y, OP)			\
Index: glibc-fsf-trunk-quilt/soft-fp/op-common.h
===================================================================
--- glibc-fsf-trunk-quilt.orig/soft-fp/op-common.h	2013-04-23 00:33:45.606803329 +0100
+++ glibc-fsf-trunk-quilt/soft-fp/op-common.h	2013-04-23 00:33:47.108144185 +0100
@@ -35,6 +35,16 @@
   _FP_I_TYPE X##_e;				\
   _FP_FRAC_DECL_##wc(X)
 
+/* Test whether the qNaN bit denotes a signaling NaN.  */
+#define _FP_FRAC_SNANP(fs, X)						\
+  ((_FP_QNANNEGATEDP)							\
+   ? (_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs)			\
+   : !(_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs))
+#define _FP_FRAC_SNANP_SEMIRAW(fs, X)					\
+  ((_FP_QNANNEGATEDP)							\
+   ? (_FP_FRAC_HIGH_##fs(X) & _FP_QNANBIT_SH_##fs)			\
+   : !(_FP_FRAC_HIGH_##fs(X) & _FP_QNANBIT_SH_##fs))
+
 /*
  * Finish truely unpacking a native fp value by classifying the kind
  * of fp value and normalizing both the exponent and the fraction.
@@ -74,7 +84,7 @@ do {									\
       {									\
 	X##_c = FP_CLS_NAN;						\
 	/* Check for signaling NaN */					\
-	if (!(_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs))		\
+	if (_FP_FRAC_SNANP(fs, X))					\
 	  FP_SET_EXCEPTION(FP_EX_INVALID);				\
       }									\
     break;								\
@@ -112,7 +122,7 @@ do {							\
 do {								\
   if (X##_e == _FP_EXPMAX_##fs					\
       && !_FP_FRAC_ZEROP_##wc(X)				\
-      && !(_FP_FRAC_HIGH_##fs(X) & _FP_QNANBIT_SH_##fs))	\
+      && _FP_FRAC_SNANP_SEMIRAW(fs, X))				\
     FP_SET_EXCEPTION(FP_EX_INVALID);				\
 } while (0)
 
@@ -127,6 +137,39 @@ do {									\
   _FP_FRAC_SLL_##wc(R, _FP_WORKBITS);					\
 } while (0)
 
+/* Make the fractional part a quiet NaN, preserving the payload
+   if possible, otherwise make it the canonical quiet NaN and set
+   the sign bit accordingly.  */
+#define _FP_SETQNAN(fs, wc, X)						\
+do {									\
+  if (_FP_QNANNEGATEDP)							\
+    {									\
+      _FP_FRAC_HIGH_RAW_##fs(X) &= _FP_QNANBIT_##fs - 1;		\
+      if (_FP_FRAC_ZEROP_##wc(X))					\
+	{								\
+	  X##_s = _FP_NANSIGN_##fs;					\
+	  _FP_FRAC_SET_##wc(X, _FP_NANFRAC_##fs);			\
+	}								\
+    }									\
+  else									\
+    _FP_FRAC_HIGH_RAW_##fs(X) |= _FP_QNANBIT_##fs;			\
+} while (0)
+#define _FP_SETQNAN_SEMIRAW(fs, wc, X)					\
+do {									\
+  if (_FP_QNANNEGATEDP)							\
+    {									\
+      _FP_FRAC_HIGH_##fs(X) &= _FP_QNANBIT_SH_##fs - 1;			\
+      if (_FP_FRAC_ZEROP_##wc(X))					\
+	{								\
+	  X##_s = _FP_NANSIGN_##fs;					\
+	  _FP_FRAC_SET_##wc(X, _FP_NANFRAC_##fs);			\
+	  _FP_FRAC_SLL_##wc(X, _FP_WORKBITS);				\
+	}								\
+    }									\
+  else									\
+    _FP_FRAC_HIGH_##fs(X) |= _FP_QNANBIT_SH_##fs;			\
+} while (0)
+
 /* Test whether a biased exponent is normal (not zero or maximum).  */
 #define _FP_EXP_NORMAL(fs, wc, X)	(((X##_e + 1) & _FP_EXPMAX_##fs) > 1)
 
@@ -159,7 +202,7 @@ do {								\
 	  X##_s = _FP_NANSIGN_##fs;				\
 	}							\
       else							\
-	_FP_FRAC_HIGH_RAW_##fs(X) |= _FP_QNANBIT_##fs;		\
+	_FP_SETQNAN(fs, wc, X);					\
     }								\
 } while (0)
 
@@ -273,7 +316,7 @@ do {								\
 	X##_s = _FP_NANSIGN_##fs;				\
       }								\
     else							\
-      _FP_FRAC_HIGH_RAW_##fs(X) |= _FP_QNANBIT_##fs;		\
+      _FP_SETQNAN(fs, wc, X);					\
     break;							\
   }								\
 } while (0)
@@ -287,7 +330,7 @@ do {								\
   if (X##_e == _FP_EXPMAX_##fs)					\
     {								\
       if (!_FP_FRAC_ZEROP_##wc(X)				\
-	  && !(_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs))	\
+	  && _FP_FRAC_SNANP(fs, X))				\
 	__ret = 1;						\
     }								\
   __ret;							\
@@ -1199,7 +1242,7 @@ do {									 \
 	  D##_e = _FP_EXPMAX_##dfs;					 \
 	  if (!_FP_FRAC_ZEROP_##swc(S))					 \
 	    {								 \
-	      if (!(_FP_FRAC_HIGH_RAW_##sfs(S) & _FP_QNANBIT_##sfs))	 \
+	      if (_FP_FRAC_SNANP(sfs, S))				 \
 		FP_SET_EXCEPTION(FP_EX_INVALID);			 \
 	      _FP_FRAC_SLL_##dwc(D, (_FP_FRACBITS_##dfs			 \
 				     - _FP_FRACBITS_##sfs));		 \
@@ -1286,7 +1329,7 @@ do {									     \
 	      /* Semi-raw NaN must have all workbits cleared.  */	     \
 	      _FP_FRAC_LOW_##dwc(D)					     \
 		&= ~(_FP_W_TYPE) ((1 << _FP_WORKBITS) - 1);		     \
-	      _FP_FRAC_HIGH_##dfs(D) |= _FP_QNANBIT_SH_##dfs;		     \
+	      _FP_SETQNAN_SEMIRAW(dfs, dwc, D);				     \
 	    }								     \
 	}								     \
     }									     \
Index: glibc-fsf-trunk-quilt/soft-fp/testit.c
===================================================================
--- glibc-fsf-trunk-quilt.orig/soft-fp/testit.c	2013-04-23 00:28:50.598144385 +0100
+++ glibc-fsf-trunk-quilt/soft-fp/testit.c	2013-04-23 00:33:47.108144185 +0100
@@ -200,17 +200,17 @@ double gen_special_double(int i)
       case 0:
 	X_c = FP_CLS_NAN;
 #if _FP_W_TYPE_SIZE < _FP_FRACBITS_D
-	__FP_FRAC_SET_2(X, _FP_QNANBIT_D, 0x1234);
+	__FP_FRAC_SET_2(X, _FP_QNANNEGATEDP ? 0 : _FP_QNANBIT_D, 0x1234);
 #else
-	_FP_FRAC_SET_1(X, _FP_QNANBIT_D | 0x1234);
+	_FP_FRAC_SET_1(X, (_FP_QNANNEGATEDP ? 0 : _FP_QNANBIT_D) | 0x1234);
 #endif
 	break;
       case 2:
 	X_c = FP_CLS_NAN;
 #if _FP_W_TYPE_SIZE < _FP_FRACBITS_D
-	__FP_FRAC_SET_2(X, _FP_QNANBIT_D, 0x1);
+	__FP_FRAC_SET_2(X, _FP_QNANNEGATEDP ? 0 : _FP_QNANBIT_D, 0x1);
 #else
-	_FP_FRAC_SET_1(X, _FP_QNANBIT_D | 0x1);
+	_FP_FRAC_SET_1(X, (_FP_QNANNEGATEDP ? 0 : _FP_QNANBIT_D) | 0x1);
 #endif
 	break;
       case 4:
Index: glibc-fsf-trunk-quilt/sysdeps/sparc/sparc32/soft-fp/sfp-machine.h
===================================================================
--- glibc-fsf-trunk-quilt.orig/sysdeps/sparc/sparc32/soft-fp/sfp-machine.h	2013-04-23 00:28:50.598144385 +0100
+++ glibc-fsf-trunk-quilt/sysdeps/sparc/sparc32/soft-fp/sfp-machine.h	2013-04-23 00:33:47.108144185 +0100
@@ -47,6 +47,7 @@
 #define _FP_NANSIGN_Q		0
 
 #define _FP_KEEPNANFRACP 1
+#define _FP_QNANNEGATEDP 0
 
 /* If one NaN is signaling and the other is not,
  * we choose that one, otherwise we choose X.
Index: glibc-fsf-trunk-quilt/sysdeps/sparc/sparc64/soft-fp/sfp-machine.h
===================================================================
--- glibc-fsf-trunk-quilt.orig/sysdeps/sparc/sparc64/soft-fp/sfp-machine.h	2013-04-23 00:28:50.598144385 +0100
+++ glibc-fsf-trunk-quilt/sysdeps/sparc/sparc64/soft-fp/sfp-machine.h	2013-04-23 00:33:47.108144185 +0100
@@ -60,6 +60,7 @@ do {								\
 #define _FP_NANSIGN_Q		0
 
 #define _FP_KEEPNANFRACP 1
+#define _FP_QNANNEGATEDP 0
 
 /* If one NaN is signaling and the other is not,
  * we choose that one, otherwise we choose Y.

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

* Re: [PATCH] MIPS/glibc: soft-fp NaN representation corrections
  2013-04-24 17:40 [PATCH] MIPS/glibc: soft-fp NaN representation corrections Maciej W. Rozycki
@ 2013-04-24 21:24 ` Joseph S. Myers
  2013-05-07 19:39   ` [BZ #15442][PATCH] " Maciej W. Rozycki
  0 siblings, 1 reply; 8+ messages in thread
From: Joseph S. Myers @ 2013-04-24 21:24 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: libc-alpha, libc-ports

On Wed, 24 Apr 2013, Maciej W. Rozycki wrote:

>  These changes touch generic code, for the most part.  They are supposed 
> not to affect targets other than MIPS, however I think it would make sense 
> to test them at least on a selection of other targets glibc supports.  
> However I am not familiar enough with other targets to know how much 
> soft-fp is used across them; also I think automatic testing may have a 
> better value than manually poking at a function or three.  I will 
> therefore appreciate ideas as to how to test these changes, or any other 
> help with that indeed.

I have run powerpc-nofpu testing with this patch applied and not seen any 
NaN-related failures, and also confirmed that the generated libc/libm 
binaries are unchanged by the patch.

I would note that the test results would be better indicative of working 
NaN handling if Thomas's patch 
<http://sourceware.org/ml/libc-ports/2013-04/msg00008.html> to test sNaN 
inputs were checked in (minus the parts that as I noted were incorrect, 
and with appropriate conditionals, with comments referencing filed bugs, 
for cases that don't yet pass) - which it doesn't seem to be yet.

I believe this patch should fix at least one user-visible bug regarding 
sqrtl NaN handling (handling of input NaNs, and producing the correct sort 
of NaN as output for negative input) - and this should show up as an 
improvement on the test-ldouble results (although there will still be 
plenty of failures there arising from use of fp-bit in libgcc not 
supporting exceptions / rounding modes).  If that bug isn't already in 
Bugzilla, it should be filed there.  In any case, the appropriate [BZ #N] 
notation should be used in the ChangeLog entries (toplevel ChangeLog, and 
ports/ChangeLog.mips, not necessarily other ports/ChangeLog.<arch> files 
although it's harmless to include it there as well) to point to the bug, 
which should also be added to the list of fixed bugs in NEWS as part of 
the fixing commit.

The patch itself looks fine to me, but I think someone else should review 
it as well.

-- 
Joseph S. Myers
joseph@codesourcery.com

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

* Re: [BZ #15442][PATCH] MIPS/glibc: soft-fp NaN representation corrections
  2013-04-24 21:24 ` Joseph S. Myers
@ 2013-05-07 19:39   ` Maciej W. Rozycki
  2013-05-13 23:19     ` [PING][BZ " Maciej W. Rozycki
  0 siblings, 1 reply; 8+ messages in thread
From: Maciej W. Rozycki @ 2013-05-07 19:39 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: Thomas Schwinge, libc-alpha, libc-ports

On Wed, 24 Apr 2013, Joseph S. Myers wrote:

> >  These changes touch generic code, for the most part.  They are supposed 
> > not to affect targets other than MIPS, however I think it would make sense 
> > to test them at least on a selection of other targets glibc supports.  
> > However I am not familiar enough with other targets to know how much 
> > soft-fp is used across them; also I think automatic testing may have a 
> > better value than manually poking at a function or three.  I will 
> > therefore appreciate ideas as to how to test these changes, or any other 
> > help with that indeed.
> 
> I have run powerpc-nofpu testing with this patch applied and not seen any 
> NaN-related failures, and also confirmed that the generated libc/libm 
> binaries are unchanged by the patch.

 Thanks.

> I would note that the test results would be better indicative of working 
> NaN handling if Thomas's patch 
> <http://sourceware.org/ml/libc-ports/2013-04/msg00008.html> to test sNaN 
> inputs were checked in (minus the parts that as I noted were incorrect, 
> and with appropriate conditionals, with comments referencing filed bugs, 
> for cases that don't yet pass) - which it doesn't seem to be yet.
> 
> I believe this patch should fix at least one user-visible bug regarding 
> sqrtl NaN handling (handling of input NaNs, and producing the correct sort 
> of NaN as output for negative input) - and this should show up as an 
> improvement on the test-ldouble results (although there will still be 
> plenty of failures there arising from use of fp-bit in libgcc not 
> supporting exceptions / rounding modes).

 These changes indeed cause the following progressions for New-ABI MIPS 
targets, thanks for the hint:

--- test-ldouble.out       2013-05-02 02:36:49.138155826 +0100
+++ test-ldouble.out       2013-05-03 20:01:50.576925141 +0100
@@ -382,11 +382,6 @@
 Failure: pow (-min_value, 0x1.ffffffffffffffffffffffffffffp+113) == +0: 
Exception "Underflow" not set
 Failure: pow (-min_value, max_value) == +0: Exception "Underflow" not set
 Failure: pow (2.0, -100000.0) == +0: Exception "Underflow" not set
-Failure: sqrt (qNaN) == qNaN: Exception "Invalid operation" set
-Failure: Test: sqrt (qNaN) == qNaN
-Result:
- is:         sNaN
- should be:  qNaN
 Failure: Test: sqrt (-1) == qNaN
 Result:
  is:         sNaN
@@ -10028,4 +10023,4 @@

 Test suite completed:
   11156 test cases plus 10128 tests for exception flags executed.
-  1986 errors occurred.
+  1984 errors occurred.

-- no progressions are seen for negative inputs because for those the 
result is passed from __kernel_standard (-lieee is not used by the test 
suite for some reason that I don't know; I think for the best results at 
least IEEE error handling should be tested in addition to the default of 
POSIX.1) that returns a double value and therefore has to be extended to a 
long double value with the aid of fp-bit that in turn has a bug in this 
area too (discussed here:
http://gcc.gnu.org/ml/gcc-patches/2013-04/msg00278.html).

> If that bug isn't already in Bugzilla, it should be filed there.  In any 
> case, the appropriate [BZ #N] notation should be used in the ChangeLog 
> entries (toplevel ChangeLog, and ports/ChangeLog.mips, not necessarily 
> other ports/ChangeLog.<arch> files although it's harmless to include it 
> there as well) to point to the bug, which should also be added to the 
> list of fixed bugs in NEWS as part of the fixing commit.

 I haven't found anything relevant, so this is now BZ #15442.

> The patch itself looks fine to me, but I think someone else should review 
> it as well.

 I will appreciate that too -- ping?

  Maciej

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

* [PING][BZ #15442][PATCH] MIPS/glibc: soft-fp NaN representation corrections
  2013-05-07 19:39   ` [BZ #15442][PATCH] " Maciej W. Rozycki
@ 2013-05-13 23:19     ` Maciej W. Rozycki
  2013-05-15 15:48       ` Joseph S. Myers
  0 siblings, 1 reply; 8+ messages in thread
From: Maciej W. Rozycki @ 2013-05-13 23:19 UTC (permalink / raw)
  To: libc-alpha; +Cc: Joseph S. Myers, Thomas Schwinge, libc-ports

On Tue, 7 May 2013, Maciej W. Rozycki wrote:

> > The patch itself looks fine to me, but I think someone else should review 
> > it as well.
> 
>  I will appreciate that too -- ping?

 Ping.  Can someone please do this second review?  The change proposed was 
posted here: <http://sourceware.org/ml/libc-alpha/2013-04/msg00646.html>.

  Maciej

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

* Re: [PING][BZ #15442][PATCH] MIPS/glibc: soft-fp NaN representation corrections
  2013-05-13 23:19     ` [PING][BZ " Maciej W. Rozycki
@ 2013-05-15 15:48       ` Joseph S. Myers
  2013-05-15 15:54         ` Richard Henderson
  0 siblings, 1 reply; 8+ messages in thread
From: Joseph S. Myers @ 2013-05-15 15:48 UTC (permalink / raw)
  To: Maciej W. Rozycki
  Cc: libc-alpha, Thomas Schwinge, libc-ports, Andreas Jaeger,
	Richard Henderson

On Tue, 14 May 2013, Maciej W. Rozycki wrote:

> On Tue, 7 May 2013, Maciej W. Rozycki wrote:
> 
> > > The patch itself looks fine to me, but I think someone else should review 
> > > it as well.
> > 
> >  I will appreciate that too -- ping?
> 
>  Ping.  Can someone please do this second review?  The change proposed was 
> posted here: <http://sourceware.org/ml/libc-alpha/2013-04/msg00646.html>.

CC:ing Andreas and Richard as the most likely second reviewers....

-- 
Joseph S. Myers
joseph@codesourcery.com

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

* Re: [PING][BZ #15442][PATCH] MIPS/glibc: soft-fp NaN representation corrections
  2013-05-15 15:48       ` Joseph S. Myers
@ 2013-05-15 15:54         ` Richard Henderson
  2013-05-15 18:19           ` Andreas Jaeger
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Henderson @ 2013-05-15 15:54 UTC (permalink / raw)
  To: Joseph S. Myers
  Cc: Maciej W. Rozycki, libc-alpha, Thomas Schwinge, libc-ports,
	Andreas Jaeger

On 05/15/2013 08:48 AM, Joseph S. Myers wrote:
> On Tue, 14 May 2013, Maciej W. Rozycki wrote:
> 
>> On Tue, 7 May 2013, Maciej W. Rozycki wrote:
>>
>>>> The patch itself looks fine to me, but I think someone else should review 
>>>> it as well.
>>>
>>>  I will appreciate that too -- ping?
>>
>>  Ping.  Can someone please do this second review?  The change proposed was 
>> posted here: <http://sourceware.org/ml/libc-alpha/2013-04/msg00646.html>.
> 
> CC:ing Andreas and Richard as the most likely second reviewers....
> 

Looks ok to me.


r~

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

* Re: [PING][BZ #15442][PATCH] MIPS/glibc: soft-fp NaN representation corrections
  2013-05-15 15:54         ` Richard Henderson
@ 2013-05-15 18:19           ` Andreas Jaeger
  2013-05-16 22:56             ` Maciej W. Rozycki
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Jaeger @ 2013-05-15 18:19 UTC (permalink / raw)
  To: Richard Henderson
  Cc: Joseph S. Myers, Maciej W. Rozycki, libc-alpha, Thomas Schwinge,
	libc-ports

On 05/15/2013 05:54 PM, Richard Henderson wrote:
> On 05/15/2013 08:48 AM, Joseph S. Myers wrote:
>> On Tue, 14 May 2013, Maciej W. Rozycki wrote:
>>
>>> On Tue, 7 May 2013, Maciej W. Rozycki wrote:
>>>
>>>>> The patch itself looks fine to me, but I think someone else should review
>>>>> it as well.
>>>>
>>>>   I will appreciate that too -- ping?
>>>
>>>   Ping.  Can someone please do this second review?  The change proposed was
>>> posted here: <http://sourceware.org/ml/libc-alpha/2013-04/msg00646.html>.
>>
>> CC:ing Andreas and Richard as the most likely second reviewers....
>>
>
> Looks ok to me.

to me as well - Maciej, feel free to commit,

Thanks,
Andreas
-- 
  Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
   SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
    GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
     GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

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

* Re: [PING][BZ #15442][PATCH] MIPS/glibc: soft-fp NaN representation corrections
  2013-05-15 18:19           ` Andreas Jaeger
@ 2013-05-16 22:56             ` Maciej W. Rozycki
  0 siblings, 0 replies; 8+ messages in thread
From: Maciej W. Rozycki @ 2013-05-16 22:56 UTC (permalink / raw)
  To: Andreas Jaeger
  Cc: Richard Henderson, Joseph S. Myers, libc-alpha, Thomas Schwinge,
	libc-ports

On Wed, 15 May 2013, Andreas Jaeger wrote:

> > > CC:ing Andreas and Richard as the most likely second reviewers....
> > > 
> > 
> > Looks ok to me.
> 
> to me as well - Maciej, feel free to commit,

 I have committed the change now and closed the bug, thank you all for the 
review.

  Maciej

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

end of thread, other threads:[~2013-05-16 22:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-24 17:40 [PATCH] MIPS/glibc: soft-fp NaN representation corrections Maciej W. Rozycki
2013-04-24 21:24 ` Joseph S. Myers
2013-05-07 19:39   ` [BZ #15442][PATCH] " Maciej W. Rozycki
2013-05-13 23:19     ` [PING][BZ " Maciej W. Rozycki
2013-05-15 15:48       ` Joseph S. Myers
2013-05-15 15:54         ` Richard Henderson
2013-05-15 18:19           ` Andreas Jaeger
2013-05-16 22:56             ` Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).