Update Linux kernel to current glibc soft-fp
Richard Henderson
rth@twiddle.net
Tue May 19 18:46:00 GMT 2015
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~
-------------- next part --------------
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) \
More information about the Libc-alpha
mailing list