Warning when compiling on NetBSD/sparc64
Martin Husemann
martin at duskware.de
Sun Dec 1 09:30:34 UTC 2013
For the record: this is the patch that I used now.
Martin
-------------- next part --------------
Index: mpn/generic/div_qr_2.c
===================================================================
RCS file: /cvsroot/src/external/lgpl3/gmp/dist/mpn/generic/div_qr_2.c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 div_qr_2.c
--- mpn/generic/div_qr_2.c 29 Nov 2013 07:49:49 -0000 1.1.1.1
+++ mpn/generic/div_qr_2.c 1 Dec 2013 09:26:59 -0000
@@ -130,10 +130,11 @@ along with the GNU MP Library. If not,
umul_ppmm (_q1d,_q0, n2, di0); \
add_sssaaaa (_q3,_q2,_q1, _q2,_q1, _q2a,_q1d); \
\
- add_ssaaaa (r1, r0, n3, n2, 0, 1); /* FIXME: combine as in x86_64 asm */ \
+ add_ssaaaa (r1, r0, n3, n2, CNST_LIMB(0), CNST_LIMB(1)); \
+ /* FIXME: combine as in x86_64 asm */ \
\
/* [q3,q2,q1,q0] += [n3,n3,n1,n0] */ \
- add_csaac (_c, _q0, _q0, n0, 0); \
+ add_csaac (_c, _q0, _q0, n0, CNST_LIMB(0)); \
add_csaac (_c, _q1, _q1, n1, _c); \
add_csaac (_c, _q2, _q2, r0, _c); \
_q3 = _q3 + r1 + _c; \
@@ -145,14 +146,14 @@ along with the GNU MP Library. If not,
\
_mask = -(mp_limb_t) (r1 >= _q1 & (r1 > _q1 | r0 >= _q0)); /* (r1,r0) >= (q1,q0) */ \
add_ssaaaa (r1, r0, r1, r0, d1 & _mask, d0 & _mask); \
- sub_ddmmss (_q3, _q2, _q3, _q2, 0, -_mask); \
+ sub_ddmmss (_q3, _q2, _q3, _q2, CNST_LIMB(0), -_mask); \
\
if (UNLIKELY (r1 >= d1)) \
{ \
if (r1 > d1 || r0 >= d0) \
{ \
sub_ddmmss (r1, r0, r1, r0, d1, d0); \
- add_ssaaaa (_q3, _q2, _q3, _q2, 0, 1); \
+ add_ssaaaa (_q3, _q2, _q3, _q2, CNST_LIMB(0), CNST_LIMB(1));\
} \
} \
(q1) = _q3; \
Index: mpn/generic/divrem_2.c
===================================================================
RCS file: /cvsroot/src/external/lgpl3/gmp/dist/mpn/generic/divrem_2.c,v
retrieving revision 1.2
diff -u -p -r1.2 divrem_2.c
--- mpn/generic/divrem_2.c 30 Nov 2013 20:30:22 -0000 1.2
+++ mpn/generic/divrem_2.c 1 Dec 2013 09:26:59 -0000
@@ -98,7 +98,7 @@ mpn_divrem_2 (mp_ptr qp, mp_size_t qxn,
for (i = qxn - 1; i >= 0; i--)
{
mp_limb_t q;
- udiv_qr_3by2 (q, r1, r0, r1, r0, 0UL, d1, d0, di.inv32);
+ udiv_qr_3by2 (q, r1, r0, r1, r0, CNST_LIMB(0), d1, d0, di.inv32);
qp[i] = q;
}
}
Index: mpn/generic/mod_1_1.c
===================================================================
RCS file: /cvsroot/src/external/lgpl3/gmp/dist/mpn/generic/mod_1_1.c,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 mod_1_1.c
--- mpn/generic/mod_1_1.c 29 Nov 2013 07:49:49 -0000 1.1.1.2
+++ mpn/generic/mod_1_1.c 1 Dec 2013 09:27:00 -0000
@@ -160,7 +160,7 @@ mpn_mod_1_1p_cps (mp_limb_t cps[4], mp_l
* B2modb = - b * bi;
* ASSERT (B2modb <= b); // NB: equality iff b = B/2
*/
- udiv_rnnd_preinv (B2modb, B1modb, 0, b, bi);
+ udiv_rnnd_preinv (B2modb, B1modb, CNST_LIMB(0), b, bi);
cps[3] = B2modb >> cnt;
}
Index: mpn/generic/mod_1_2.c
===================================================================
RCS file: /cvsroot/src/external/lgpl3/gmp/dist/mpn/generic/mod_1_2.c,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 mod_1_2.c
--- mpn/generic/mod_1_2.c 29 Nov 2013 07:49:49 -0000 1.1.1.2
+++ mpn/generic/mod_1_2.c 1 Dec 2013 09:27:00 -0000
@@ -51,10 +51,10 @@ mpn_mod_1s_2p_cps (mp_limb_t cps[5], mp_
ASSERT (B1modb <= b); /* NB: not fully reduced mod b */
cps[2] = B1modb >> cnt;
- udiv_rnnd_preinv (B2modb, B1modb, 0, b, bi);
+ udiv_rnnd_preinv (B2modb, B1modb, CNST_LIMB(0), b, bi);
cps[3] = B2modb >> cnt;
- udiv_rnnd_preinv (B3modb, B2modb, 0, b, bi);
+ udiv_rnnd_preinv (B3modb, B2modb, CNST_LIMB(0), b, bi);
cps[4] = B3modb >> cnt;
#if WANT_ASSERT
Index: mpn/generic/mod_1_3.c
===================================================================
RCS file: /cvsroot/src/external/lgpl3/gmp/dist/mpn/generic/mod_1_3.c,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 mod_1_3.c
--- mpn/generic/mod_1_3.c 29 Nov 2013 07:49:49 -0000 1.1.1.2
+++ mpn/generic/mod_1_3.c 1 Dec 2013 09:27:00 -0000
@@ -51,13 +51,13 @@ mpn_mod_1s_3p_cps (mp_limb_t cps[6], mp_
ASSERT (B1modb <= b); /* NB: not fully reduced mod b */
cps[2] = B1modb >> cnt;
- udiv_rnnd_preinv (B2modb, B1modb, 0, b, bi);
+ udiv_rnnd_preinv (B2modb, B1modb, CNST_LIMB(0), b, bi);
cps[3] = B2modb >> cnt;
- udiv_rnnd_preinv (B3modb, B2modb, 0, b, bi);
+ udiv_rnnd_preinv (B3modb, B2modb, CNST_LIMB(0), b, bi);
cps[4] = B3modb >> cnt;
- udiv_rnnd_preinv (B4modb, B3modb, 0, b, bi);
+ udiv_rnnd_preinv (B4modb, B3modb, CNST_LIMB(0), b, bi);
cps[5] = B4modb >> cnt;
#if WANT_ASSERT
Index: mpn/generic/mod_1_4.c
===================================================================
RCS file: /cvsroot/src/external/lgpl3/gmp/dist/mpn/generic/mod_1_4.c,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 mod_1_4.c
--- mpn/generic/mod_1_4.c 29 Nov 2013 07:49:49 -0000 1.1.1.2
+++ mpn/generic/mod_1_4.c 1 Dec 2013 09:27:00 -0000
@@ -51,16 +51,16 @@ mpn_mod_1s_4p_cps (mp_limb_t cps[7], mp_
ASSERT (B1modb <= b); /* NB: not fully reduced mod b */
cps[2] = B1modb >> cnt;
- udiv_rnnd_preinv (B2modb, B1modb, 0, b, bi);
+ udiv_rnnd_preinv (B2modb, B1modb, CNST_LIMB(0), b, bi);
cps[3] = B2modb >> cnt;
- udiv_rnnd_preinv (B3modb, B2modb, 0, b, bi);
+ udiv_rnnd_preinv (B3modb, B2modb, CNST_LIMB(0), b, bi);
cps[4] = B3modb >> cnt;
- udiv_rnnd_preinv (B4modb, B3modb, 0, b, bi);
+ udiv_rnnd_preinv (B4modb, B3modb, CNST_LIMB(0), b, bi);
cps[5] = B4modb >> cnt;
- udiv_rnnd_preinv (B5modb, B4modb, 0, b, bi);
+ udiv_rnnd_preinv (B5modb, B4modb, CNST_LIMB(0), b, bi);
cps[6] = B5modb >> cnt;
#if WANT_ASSERT
More information about the gmp-bugs
mailing list