diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2010-12-17 11:38:36 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2010-12-17 11:38:36 +0000 |
commit | ba5a539f5ff01e9b0c778efb9be19ab5d1a0eb2c (patch) | |
tree | fb57c63ad143a23c60ec3f4b33c7b09dd01aa08e /src/sub1sp.c | |
parent | 856626cb99cf746529aa3107acb2c8b0ea43614d (diff) | |
download | mpfr-ba5a539f5ff01e9b0c778efb9be19ab5d1a0eb2c.tar.gz |
Added MPFR_TMP_LIMBS_ALLOC macro and updated the source to use it.
tools/mpfrlint: check its use instead of MPFR_TMP_ALLOC.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7300 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/sub1sp.c')
-rw-r--r-- | src/sub1sp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sub1sp.c b/src/sub1sp.c index 728101930..3dd9aaab4 100644 --- a/src/sub1sp.c +++ b/src/sub1sp.c @@ -301,7 +301,7 @@ mpfr_sub1sp (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mpfr_rnd_t rnd_mode) /* Shift c in the allocated temporary block */ SubD1NoLose: c0 = cp[0] & (MPFR_LIMB_ONE<<sh); - cp = (mp_limb_t*) MPFR_TMP_ALLOC(n * BYTES_PER_MP_LIMB); + cp = MPFR_TMP_LIMBS_ALLOC (n); mpn_rshift(cp, MPFR_MANT(c), n, 1); if (MPFR_LIKELY(c0 == 0)) { @@ -346,7 +346,7 @@ mpfr_sub1sp (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mpfr_rnd_t rnd_mode) /* Calcul of 2*b-c (Exact) */ /* Shift b in the allocated temporary block */ SubD1Lose: - bp = (mp_limb_t*) MPFR_TMP_ALLOC (n * BYTES_PER_MP_LIMB); + bp = MPFR_TMP_LIMBS_ALLOC (n); mpn_lshift (bp, MPFR_MANT(b), n, 1); ap = MPFR_MANT(a); mpn_sub_n (ap, bp, cp, n); @@ -497,7 +497,7 @@ mpfr_sub1sp (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mpfr_rnd_t rnd_mode) /* General case: 2 <= d < p */ MPFR_UNSIGNED_MINUS_MODULO(sh, p); - cp = (mp_limb_t*) MPFR_TMP_ALLOC(n * BYTES_PER_MP_LIMB); + cp = MPFR_TMP_LIMBS_ALLOC (n); /* Shift c in temporary allocated place */ dm = d % GMP_NUMB_BITS; |