diff mbox

Update Linux kernel to current glibc soft-fp

Message ID 555B6623.9080308@twiddle.net
State New
Headers show

Commit Message

Richard Henderson May 19, 2015, 4:34 p.m. UTC
On 05/15/2015 07:47 AM, Joseph Myers wrote:
> * Boot the new kernel on a system (physical or virtual) where the
>   emulation code will be used, and run the glibc math/ tests (glibc
>   built for hard-float) on that system, making sure the results are no
>   worse than for an old kernel (that is, that no failures appear that
>   seem likely to be related to the changes; if your existing baseline
>   has some libm test failures, that means looking in more detail at
>   *which* individual tests in test-float, test-double, test-ldouble
>   are failing before and after the kernel patch, to make sure it isn't
>   introducing such failures).  If you see such failures, again, either
>   debug and fix them or report them to me (though instrumenting the
>   relevant functions to track down which operation's results are
>   changing may help a lot in finding where the problem it).

Success, given the following additional patch.

> @@ -256,26 +259,44 @@ alpha_fp_emul (unsigned long pc)
>  			goto done_d;
>  
>  		case FOP_FNC_CVTxS:
> -			FP_FROM_INT_S(SR, ((long)vb), 64, long);
> -			goto pack_s;
> +			FP_FROM_INT_S(SR, ((long)vb), 64, unsigned long);
> +			goto pack_raw_s;
>  
>  		case FOP_FNC_CVTxT:
> -			FP_FROM_INT_D(DR, ((long)vb), 64, long);
> -			goto pack_d;
> +			FP_FROM_INT_D(DR, ((long)vb), 64, unsigned long);
> +			goto pack_raw_d;

The second argument to FP_FROM_INT_* is not an lvalue, and I don't think it
makes sense to require it be such.


r~

Comments

Joseph Myers May 19, 2015, 5:46 p.m. UTC | #1
On Tue, 19 May 2015, Richard Henderson wrote:

> On 05/15/2015 07:47 AM, Joseph Myers wrote:
> > * Boot the new kernel on a system (physical or virtual) where the
> >   emulation code will be used, and run the glibc math/ tests (glibc
> >   built for hard-float) on that system, making sure the results are no
> >   worse than for an old kernel (that is, that no failures appear that
> >   seem likely to be related to the changes; if your existing baseline
> >   has some libm test failures, that means looking in more detail at
> >   *which* individual tests in test-float, test-double, test-ldouble
> >   are failing before and after the kernel patch, to make sure it isn't
> >   introducing such failures).  If you see such failures, again, either
> >   debug and fix them or report them to me (though instrumenting the
> >   relevant functions to track down which operation's results are
> >   changing may help a lot in finding where the problem it).
> 
> Success, given the following additional patch.

Thanks.  That patch is OK for glibc soft-fp/op-common.h, please commit.  
I'll update the Linux kernel patch, retest for powerpc and submit for 
kernel inclusion.
diff mbox

Patch

diff --git a/include/math-emu/op-common.h b/include/math-emu/op-common.h
index 9c1c5e3..080ef0e 100644
--- a/include/math-emu/op-common.h
+++ b/include/math-emu/op-common.h
@@ -1794,12 +1794,11 @@ 
       __label__ pack_semiraw;						\
       if (r)								\
 	{								\
-	  rtype _FP_FROM_INT_ur;					\
+	  rtype _FP_FROM_INT_ur = (r);					\
 									\
 	  if ((X##_s = ((r) < 0)))					\
-	    (r) = -(rtype) (r);						\
+	    _FP_FROM_INT_ur = -_FP_FROM_INT_ur;				\
 									\
-	  _FP_FROM_INT_ur = (rtype) (r);				\
 	  _FP_STATIC_ASSERT ((rsize) <= 2 * _FP_W_TYPE_SIZE,		\
 			     "rsize too large");			\
 	  (void) (((rsize) <= _FP_W_TYPE_SIZE)				\