aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/generic
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-05-07 21:04:52 +0000
committerRoland McGrath <roland@gnu.org>1996-05-07 21:04:52 +0000
commitb928942eaa0401de9189a2709188f584425f5ca6 (patch)
tree5e0654a6667b8ae0cc981d78532b166e4a1f51c4 /sysdeps/generic
parentfc38dc5be9c2757afc56a64a9570872c7e24887a (diff)
downloadglibc-b928942eaa0401de9189a2709188f584425f5ca6.tar
glibc-b928942eaa0401de9189a2709188f584425f5ca6.tar.gz
glibc-b928942eaa0401de9189a2709188f584425f5ca6.tar.bz2
glibc-b928942eaa0401de9189a2709188f584425f5ca6.zip
Updated from /src/gmp-2.0
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/add_n.c7
-rw-r--r--sysdeps/generic/addmul_1.c13
-rw-r--r--sysdeps/generic/cmp.c5
-rw-r--r--sysdeps/generic/divmod_1.c19
-rw-r--r--sysdeps/generic/divrem.c33
-rw-r--r--sysdeps/generic/gmp-mparam.h3
-rw-r--r--sysdeps/generic/lshift.c9
-rw-r--r--sysdeps/generic/mod_1.c19
-rw-r--r--sysdeps/generic/mul.c11
-rw-r--r--sysdeps/generic/mul_1.c11
-rw-r--r--sysdeps/generic/mul_n.c19
-rw-r--r--sysdeps/generic/rshift.c9
-rw-r--r--sysdeps/generic/sub_n.c7
-rw-r--r--sysdeps/generic/submul_1.c13
14 files changed, 96 insertions, 82 deletions
diff --git a/sysdeps/generic/add_n.c b/sysdeps/generic/add_n.c
index 647548d4c1..9d71df110c 100644
--- a/sysdeps/generic/add_n.c
+++ b/sysdeps/generic/add_n.c
@@ -16,12 +16,13 @@ License for more details.
You should have received a copy of the GNU Library General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
#include "gmp.h"
#include "gmp-impl.h"
-mp_limb
+mp_limb_t
#if __STDC__
mpn_add_n (mp_ptr res_ptr, mp_srcptr s1_ptr, mp_srcptr s2_ptr, mp_size_t size)
#else
@@ -32,7 +33,7 @@ mpn_add_n (res_ptr, s1_ptr, s2_ptr, size)
mp_size_t size;
#endif
{
- register mp_limb x, y, cy;
+ register mp_limb_t x, y, cy;
register mp_size_t j;
/* The loop counter and index J goes from -SIZE to -1. This way
diff --git a/sysdeps/generic/addmul_1.c b/sysdeps/generic/addmul_1.c
index 6156cab82c..3a5e21400a 100644
--- a/sysdeps/generic/addmul_1.c
+++ b/sysdeps/generic/addmul_1.c
@@ -19,23 +19,24 @@ License for more details.
You should have received a copy of the GNU Library General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
#include "gmp.h"
#include "gmp-impl.h"
#include "longlong.h"
-mp_limb
+mp_limb_t
mpn_addmul_1 (res_ptr, s1_ptr, s1_size, s2_limb)
register mp_ptr res_ptr;
register mp_srcptr s1_ptr;
mp_size_t s1_size;
- register mp_limb s2_limb;
+ register mp_limb_t s2_limb;
{
- register mp_limb cy_limb;
+ register mp_limb_t cy_limb;
register mp_size_t j;
- register mp_limb prod_high, prod_low;
- register mp_limb x;
+ register mp_limb_t prod_high, prod_low;
+ register mp_limb_t x;
/* The loop counter and index J goes from -SIZE to -1. This way
the loop becomes faster. */
diff --git a/sysdeps/generic/cmp.c b/sysdeps/generic/cmp.c
index e499b1ec44..4e9c60d86e 100644
--- a/sysdeps/generic/cmp.c
+++ b/sysdeps/generic/cmp.c
@@ -16,7 +16,8 @@ License for more details.
You should have received a copy of the GNU Library General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
#include "gmp.h"
#include "gmp-impl.h"
@@ -37,7 +38,7 @@ mpn_cmp (op1_ptr, op2_ptr, size)
#endif
{
mp_size_t i;
- mp_limb op1_word, op2_word;
+ mp_limb_t op1_word, op2_word;
for (i = size - 1; i >= 0; i--)
{
diff --git a/sysdeps/generic/divmod_1.c b/sysdeps/generic/divmod_1.c
index c04032750c..f93841f63f 100644
--- a/sysdeps/generic/divmod_1.c
+++ b/sysdeps/generic/divmod_1.c
@@ -22,7 +22,8 @@ License for more details.
You should have received a copy of the GNU Library General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
#include "gmp.h"
#include "gmp-impl.h"
@@ -39,21 +40,21 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* FIXME: We should be using invert_limb (or invert_normalized_limb)
here (not udiv_qrnnd). */
-mp_limb
+mp_limb_t
#if __STDC__
mpn_divmod_1 (mp_ptr quot_ptr,
mp_srcptr dividend_ptr, mp_size_t dividend_size,
- mp_limb divisor_limb)
+ mp_limb_t divisor_limb)
#else
mpn_divmod_1 (quot_ptr, dividend_ptr, dividend_size, divisor_limb)
mp_ptr quot_ptr;
mp_srcptr dividend_ptr;
mp_size_t dividend_size;
- mp_limb divisor_limb;
+ mp_limb_t divisor_limb;
#endif
{
mp_size_t i;
- mp_limb n1, n0, r;
+ mp_limb_t n1, n0, r;
int dummy;
/* ??? Should this be handled at all? Rely on callers? */
@@ -75,7 +76,7 @@ mpn_divmod_1 (quot_ptr, dividend_ptr, dividend_size, divisor_limb)
count_leading_zeros (normalization_steps, divisor_limb);
if (normalization_steps != 0)
{
- mp_limb divisor_limb_inverted;
+ mp_limb_t divisor_limb_inverted;
divisor_limb <<= normalization_steps;
@@ -85,7 +86,7 @@ mpn_divmod_1 (quot_ptr, dividend_ptr, dividend_size, divisor_limb)
/* Special case for DIVISOR_LIMB == 100...000. */
if (divisor_limb << 1 == 0)
- divisor_limb_inverted = ~(mp_limb) 0;
+ divisor_limb_inverted = ~(mp_limb_t) 0;
else
udiv_qrnnd (divisor_limb_inverted, dummy,
-divisor_limb, 0, divisor_limb);
@@ -115,7 +116,7 @@ mpn_divmod_1 (quot_ptr, dividend_ptr, dividend_size, divisor_limb)
}
else
{
- mp_limb divisor_limb_inverted;
+ mp_limb_t divisor_limb_inverted;
/* Compute (2**2N - 2**N * DIVISOR_LIMB) / DIVISOR_LIMB. The
result is a (N+1)-bit approximation to 1/DIVISOR_LIMB, with the
@@ -123,7 +124,7 @@ mpn_divmod_1 (quot_ptr, dividend_ptr, dividend_size, divisor_limb)
/* Special case for DIVISOR_LIMB == 100...000. */
if (divisor_limb << 1 == 0)
- divisor_limb_inverted = ~(mp_limb) 0;
+ divisor_limb_inverted = ~(mp_limb_t) 0;
else
udiv_qrnnd (divisor_limb_inverted, dummy,
-divisor_limb, 0, divisor_limb);
diff --git a/sysdeps/generic/divrem.c b/sysdeps/generic/divrem.c
index 610bb7adc5..1fe865a10b 100644
--- a/sysdeps/generic/divrem.c
+++ b/sysdeps/generic/divrem.c
@@ -17,7 +17,8 @@ License for more details.
You should have received a copy of the GNU Library General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
#include "gmp.h"
#include "gmp-impl.h"
@@ -39,7 +40,7 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
remainder in NUM.
3. NSIZE >= DSIZE, even if QEXTRA_LIMBS is non-zero. */
-mp_limb
+mp_limb_t
#if __STDC__
mpn_divrem (mp_ptr qp, mp_size_t qextra_limbs,
mp_ptr np, mp_size_t nsize,
@@ -54,7 +55,7 @@ mpn_divrem (qp, qextra_limbs, np, nsize, dp, dsize)
mp_size_t dsize;
#endif
{
- mp_limb most_significant_q_limb = 0;
+ mp_limb_t most_significant_q_limb = 0;
switch (dsize)
{
@@ -66,8 +67,8 @@ mpn_divrem (qp, qextra_limbs, np, nsize, dp, dsize)
case 1:
{
mp_size_t i;
- mp_limb n1;
- mp_limb d;
+ mp_limb_t n1;
+ mp_limb_t d;
d = dp[0];
n1 = np[nsize - 1];
@@ -93,8 +94,8 @@ mpn_divrem (qp, qextra_limbs, np, nsize, dp, dsize)
case 2:
{
mp_size_t i;
- mp_limb n1, n0, n2;
- mp_limb d1, d0;
+ mp_limb_t n1, n0, n2;
+ mp_limb_t d1, d0;
np += nsize - 2;
d1 = dp[1];
@@ -110,8 +111,8 @@ mpn_divrem (qp, qextra_limbs, np, nsize, dp, dsize)
for (i = qextra_limbs + nsize - 2 - 1; i >= 0; i--)
{
- mp_limb q;
- mp_limb r;
+ mp_limb_t q;
+ mp_limb_t r;
if (i >= qextra_limbs)
np--;
@@ -123,7 +124,7 @@ mpn_divrem (qp, qextra_limbs, np, nsize, dp, dsize)
/* Q should be either 111..111 or 111..110. Need special
treatment of this rare case as normal division would
give overflow. */
- q = ~(mp_limb) 0;
+ q = ~(mp_limb_t) 0;
r = n0 + d1;
if (r < d1) /* Carry in the addition? */
@@ -165,7 +166,7 @@ mpn_divrem (qp, qextra_limbs, np, nsize, dp, dsize)
default:
{
mp_size_t i;
- mp_limb dX, d1, n0;
+ mp_limb_t dX, d1, n0;
np += nsize - dsize;
dX = dp[dsize - 1];
@@ -184,9 +185,9 @@ mpn_divrem (qp, qextra_limbs, np, nsize, dp, dsize)
for (i = qextra_limbs + nsize - dsize - 1; i >= 0; i--)
{
- mp_limb q;
- mp_limb n1, n2;
- mp_limb cy_limb;
+ mp_limb_t q;
+ mp_limb_t n1, n2;
+ mp_limb_t cy_limb;
if (i >= qextra_limbs)
{
@@ -203,10 +204,10 @@ mpn_divrem (qp, qextra_limbs, np, nsize, dp, dsize)
if (n0 == dX)
/* This might over-estimate q, but it's probably not worth
the extra code here to find out. */
- q = ~(mp_limb) 0;
+ q = ~(mp_limb_t) 0;
else
{
- mp_limb r;
+ mp_limb_t r;
udiv_qrnnd (q, r, n0, np[dsize - 1], dX);
umul_ppmm (n1, n0, d1, q);
diff --git a/sysdeps/generic/gmp-mparam.h b/sysdeps/generic/gmp-mparam.h
index 4286ebf03b..7c885575b3 100644
--- a/sysdeps/generic/gmp-mparam.h
+++ b/sysdeps/generic/gmp-mparam.h
@@ -16,7 +16,8 @@ License for more details.
You should have received a copy of the GNU Library General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
#define BITS_PER_MP_LIMB 32
#define BYTES_PER_MP_LIMB 4
diff --git a/sysdeps/generic/lshift.c b/sysdeps/generic/lshift.c
index 35794e4ea8..e244bc52f1 100644
--- a/sysdeps/generic/lshift.c
+++ b/sysdeps/generic/lshift.c
@@ -16,7 +16,8 @@ License for more details.
You should have received a copy of the GNU Library General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
#include "gmp.h"
#include "gmp-impl.h"
@@ -30,7 +31,7 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
2. If the result is to be written over the input, WP must be >= UP.
*/
-mp_limb
+mp_limb_t
#if __STDC__
mpn_lshift (register mp_ptr wp,
register mp_srcptr up, mp_size_t usize,
@@ -43,10 +44,10 @@ mpn_lshift (wp, up, usize, cnt)
register unsigned int cnt;
#endif
{
- register mp_limb high_limb, low_limb;
+ register mp_limb_t high_limb, low_limb;
register unsigned sh_1, sh_2;
register mp_size_t i;
- mp_limb retval;
+ mp_limb_t retval;
#ifdef DEBUG
if (usize == 0 || cnt == 0)
diff --git a/sysdeps/generic/mod_1.c b/sysdeps/generic/mod_1.c
index 0842f6b1ee..314d11b301 100644
--- a/sysdeps/generic/mod_1.c
+++ b/sysdeps/generic/mod_1.c
@@ -19,7 +19,8 @@ License for more details.
You should have received a copy of the GNU Library General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
#include "gmp.h"
#include "gmp-impl.h"
@@ -36,19 +37,19 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* FIXME: We should be using invert_limb (or invert_normalized_limb)
here (not udiv_qrnnd). */
-mp_limb
+mp_limb_t
#if __STDC__
mpn_mod_1 (mp_srcptr dividend_ptr, mp_size_t dividend_size,
- mp_limb divisor_limb)
+ mp_limb_t divisor_limb)
#else
mpn_mod_1 (dividend_ptr, dividend_size, divisor_limb)
mp_srcptr dividend_ptr;
mp_size_t dividend_size;
- mp_limb divisor_limb;
+ mp_limb_t divisor_limb;
#endif
{
mp_size_t i;
- mp_limb n1, n0, r;
+ mp_limb_t n1, n0, r;
int dummy;
/* Botch: Should this be handled at all? Rely on callers? */
@@ -70,7 +71,7 @@ mpn_mod_1 (dividend_ptr, dividend_size, divisor_limb)
count_leading_zeros (normalization_steps, divisor_limb);
if (normalization_steps != 0)
{
- mp_limb divisor_limb_inverted;
+ mp_limb_t divisor_limb_inverted;
divisor_limb <<= normalization_steps;
@@ -80,7 +81,7 @@ mpn_mod_1 (dividend_ptr, dividend_size, divisor_limb)
/* Special case for DIVISOR_LIMB == 100...000. */
if (divisor_limb << 1 == 0)
- divisor_limb_inverted = ~(mp_limb) 0;
+ divisor_limb_inverted = ~(mp_limb_t) 0;
else
udiv_qrnnd (divisor_limb_inverted, dummy,
-divisor_limb, 0, divisor_limb);
@@ -110,7 +111,7 @@ mpn_mod_1 (dividend_ptr, dividend_size, divisor_limb)
}
else
{
- mp_limb divisor_limb_inverted;
+ mp_limb_t divisor_limb_inverted;
/* Compute (2**2N - 2**N * DIVISOR_LIMB) / DIVISOR_LIMB. The
result is a (N+1)-bit approximation to 1/DIVISOR_LIMB, with the
@@ -118,7 +119,7 @@ mpn_mod_1 (dividend_ptr, dividend_size, divisor_limb)
/* Special case for DIVISOR_LIMB == 100...000. */
if (divisor_limb << 1 == 0)
- divisor_limb_inverted = ~(mp_limb) 0;
+ divisor_limb_inverted = ~(mp_limb_t) 0;
else
udiv_qrnnd (divisor_limb_inverted, dummy,
-divisor_limb, 0, divisor_limb);
diff --git a/sysdeps/generic/mul.c b/sysdeps/generic/mul.c
index 3f3f41e99f..dcf8cb4da0 100644
--- a/sysdeps/generic/mul.c
+++ b/sysdeps/generic/mul.c
@@ -16,7 +16,8 @@ License for more details.
You should have received a copy of the GNU Library General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
#include "gmp.h"
#include "gmp-impl.h"
@@ -41,7 +42,7 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define KARATSUBA_THRESHOLD 32
#endif
-mp_limb
+mp_limb_t
#if __STDC__
mpn_mul (mp_ptr prodp,
mp_srcptr up, mp_size_t usize,
@@ -56,7 +57,7 @@ mpn_mul (prodp, up, usize, vp, vsize)
#endif
{
mp_ptr prod_endp = prodp + usize + vsize - 1;
- mp_limb cy;
+ mp_limb_t cy;
mp_ptr tspace;
TMP_DECL (marker);
@@ -69,8 +70,8 @@ mpn_mul (prodp, up, usize, vp, vsize)
here immediately. Huge ones arrive here as this is the base case
for Karatsuba's recursive algorithm below. */
mp_size_t i;
- mp_limb cy_limb;
- mp_limb v_limb;
+ mp_limb_t cy_limb;
+ mp_limb_t v_limb;
if (vsize == 0)
return 0;
diff --git a/sysdeps/generic/mul_1.c b/sysdeps/generic/mul_1.c
index 01fdbbbc9b..2de680a64b 100644
--- a/sysdeps/generic/mul_1.c
+++ b/sysdeps/generic/mul_1.c
@@ -17,22 +17,23 @@ License for more details.
You should have received a copy of the GNU Library General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
#include "gmp.h"
#include "gmp-impl.h"
#include "longlong.h"
-mp_limb
+mp_limb_t
mpn_mul_1 (res_ptr, s1_ptr, s1_size, s2_limb)
register mp_ptr res_ptr;
register mp_srcptr s1_ptr;
mp_size_t s1_size;
- register mp_limb s2_limb;
+ register mp_limb_t s2_limb;
{
- register mp_limb cy_limb;
+ register mp_limb_t cy_limb;
register mp_size_t j;
- register mp_limb prod_high, prod_low;
+ register mp_limb_t prod_high, prod_low;
/* The loop counter and index J goes from -S1_SIZE to -1. This way
the loop becomes faster. */
diff --git a/sysdeps/generic/mul_n.c b/sysdeps/generic/mul_n.c
index 049f63dce8..b38e8ad17e 100644
--- a/sysdeps/generic/mul_n.c
+++ b/sysdeps/generic/mul_n.c
@@ -16,7 +16,8 @@ License for more details.
You should have received a copy of the GNU Library General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
#include "gmp.h"
#include "gmp-impl.h"
@@ -60,8 +61,8 @@ impn_mul_n_basecase (prodp, up, vp, size)
#endif
{
mp_size_t i;
- mp_limb cy_limb;
- mp_limb v_limb;
+ mp_limb_t cy_limb;
+ mp_limb_t v_limb;
/* Multiply by the first limb in V separately, as the result can be
stored (not added) to PROD. We also avoid a loop for zeroing. */
@@ -125,7 +126,7 @@ impn_mul_n (prodp, up, vp, size, tspace)
stack grow a lot less. */
mp_size_t esize = size - 1; /* even size */
- mp_limb cy_limb;
+ mp_limb_t cy_limb;
MPN_MUL_N_RECURSE (prodp, up, vp, esize, tspace);
cy_limb = mpn_addmul_1 (prodp + esize, up, esize, vp[esize]);
@@ -152,7 +153,7 @@ impn_mul_n (prodp, up, vp, size, tspace)
Where B = 2**BITS_PER_MP_LIMB. */
mp_size_t hsize = size >> 1;
- mp_limb cy;
+ mp_limb_t cy;
int negflg;
/*** Product H. ________________ ________________
@@ -229,8 +230,8 @@ impn_sqr_n_basecase (prodp, up, size)
#endif
{
mp_size_t i;
- mp_limb cy_limb;
- mp_limb v_limb;
+ mp_limb_t cy_limb;
+ mp_limb_t v_limb;
/* Multiply by the first limb in V separately, as the result can be
stored (not added) to PROD. We also avoid a loop for zeroing. */
@@ -293,7 +294,7 @@ impn_sqr_n (prodp, up, size, tspace)
stack grow a lot less. */
mp_size_t esize = size - 1; /* even size */
- mp_limb cy_limb;
+ mp_limb_t cy_limb;
MPN_SQR_N_RECURSE (prodp, up, esize, tspace);
cy_limb = mpn_addmul_1 (prodp + esize, up, esize, up[esize]);
@@ -305,7 +306,7 @@ impn_sqr_n (prodp, up, size, tspace)
else
{
mp_size_t hsize = size >> 1;
- mp_limb cy;
+ mp_limb_t cy;
/*** Product H. ________________ ________________
|_____U1 x U1____||____U0 x U0_____| */
diff --git a/sysdeps/generic/rshift.c b/sysdeps/generic/rshift.c
index 7ce02e07f7..804f9be582 100644
--- a/sysdeps/generic/rshift.c
+++ b/sysdeps/generic/rshift.c
@@ -16,7 +16,8 @@ License for more details.
You should have received a copy of the GNU Library General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
#include "gmp.h"
#include "gmp-impl.h"
@@ -30,7 +31,7 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
2. If the result is to be written over the input, WP must be <= UP.
*/
-mp_limb
+mp_limb_t
#if __STDC__
mpn_rshift (register mp_ptr wp,
register mp_srcptr up, mp_size_t usize,
@@ -43,10 +44,10 @@ mpn_rshift (wp, up, usize, cnt)
register unsigned int cnt;
#endif
{
- register mp_limb high_limb, low_limb;
+ register mp_limb_t high_limb, low_limb;
register unsigned sh_1, sh_2;
register mp_size_t i;
- mp_limb retval;
+ mp_limb_t retval;
#ifdef DEBUG
if (usize == 0 || cnt == 0)
diff --git a/sysdeps/generic/sub_n.c b/sysdeps/generic/sub_n.c
index f3c83d1fd6..9d4b216758 100644
--- a/sysdeps/generic/sub_n.c
+++ b/sysdeps/generic/sub_n.c
@@ -16,12 +16,13 @@ License for more details.
You should have received a copy of the GNU Library General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
#include "gmp.h"
#include "gmp-impl.h"
-mp_limb
+mp_limb_t
#if __STDC__
mpn_sub_n (mp_ptr res_ptr, mp_srcptr s1_ptr, mp_srcptr s2_ptr, mp_size_t size)
#else
@@ -32,7 +33,7 @@ mpn_sub_n (res_ptr, s1_ptr, s2_ptr, size)
mp_size_t size;
#endif
{
- register mp_limb x, y, cy;
+ register mp_limb_t x, y, cy;
register mp_size_t j;
/* The loop counter and index J goes from -SIZE to -1. This way
diff --git a/sysdeps/generic/submul_1.c b/sysdeps/generic/submul_1.c
index 57122a5784..b144283bd9 100644
--- a/sysdeps/generic/submul_1.c
+++ b/sysdeps/generic/submul_1.c
@@ -19,23 +19,24 @@ License for more details.
You should have received a copy of the GNU Library General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
#include "gmp.h"
#include "gmp-impl.h"
#include "longlong.h"
-mp_limb
+mp_limb_t
mpn_submul_1 (res_ptr, s1_ptr, s1_size, s2_limb)
register mp_ptr res_ptr;
register mp_srcptr s1_ptr;
mp_size_t s1_size;
- register mp_limb s2_limb;
+ register mp_limb_t s2_limb;
{
- register mp_limb cy_limb;
+ register mp_limb_t cy_limb;
register mp_size_t j;
- register mp_limb prod_high, prod_low;
- register mp_limb x;
+ register mp_limb_t prod_high, prod_low;
+ register mp_limb_t x;
/* The loop counter and index J goes from -SIZE to -1. This way
the loop becomes faster. */