Blame mpn/generic/toom_interpolate_12pts.c

Packit 5c3484
/* Interpolation for the algorithm Toom-Cook 6.5-way.
Packit 5c3484
Packit 5c3484
   Contributed to the GNU project by Marco Bodrato.
Packit 5c3484
Packit 5c3484
   THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE.  IT IS ONLY
Packit 5c3484
   SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES.  IN FACT, IT IS ALMOST
Packit 5c3484
   GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE.
Packit 5c3484
Packit 5c3484
Copyright 2009, 2010, 2012 Free Software Foundation, Inc.
Packit 5c3484
Packit 5c3484
This file is part of the GNU MP Library.
Packit 5c3484
Packit 5c3484
The GNU MP Library is free software; you can redistribute it and/or modify
Packit 5c3484
it under the terms of either:
Packit 5c3484
Packit 5c3484
  * the GNU Lesser General Public License as published by the Free
Packit 5c3484
    Software Foundation; either version 3 of the License, or (at your
Packit 5c3484
    option) any later version.
Packit 5c3484
Packit 5c3484
or
Packit 5c3484
Packit 5c3484
  * the GNU General Public License as published by the Free Software
Packit 5c3484
    Foundation; either version 2 of the License, or (at your option) any
Packit 5c3484
    later version.
Packit 5c3484
Packit 5c3484
or both in parallel, as here.
Packit 5c3484
Packit 5c3484
The GNU MP Library is distributed in the hope that it will be useful, but
Packit 5c3484
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
Packit 5c3484
or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
Packit 5c3484
for more details.
Packit 5c3484
Packit 5c3484
You should have received copies of the GNU General Public License and the
Packit 5c3484
GNU Lesser General Public License along with the GNU MP Library.  If not,
Packit 5c3484
see https://www.gnu.org/licenses/.  */
Packit 5c3484
Packit 5c3484
Packit 5c3484
#include "gmp.h"
Packit 5c3484
#include "gmp-impl.h"
Packit 5c3484
Packit 5c3484
Packit 5c3484
#if HAVE_NATIVE_mpn_sublsh_n
Packit 5c3484
#define DO_mpn_sublsh_n(dst,src,n,s,ws) mpn_sublsh_n(dst,dst,src,n,s)
Packit 5c3484
#else
Packit 5c3484
static mp_limb_t
Packit 5c3484
DO_mpn_sublsh_n(mp_ptr dst, mp_srcptr src, mp_size_t n, unsigned int s, mp_ptr ws)
Packit 5c3484
{
Packit 5c3484
#if USE_MUL_1 && 0
Packit 5c3484
  return mpn_submul_1(dst,src,n,CNST_LIMB(1) <<(s));
Packit 5c3484
#else
Packit 5c3484
  mp_limb_t __cy;
Packit 5c3484
  __cy = mpn_lshift(ws,src,n,s);
Packit 5c3484
  return    __cy + mpn_sub_n(dst,dst,ws,n);
Packit 5c3484
#endif
Packit 5c3484
}
Packit 5c3484
#endif
Packit 5c3484
Packit 5c3484
#if HAVE_NATIVE_mpn_addlsh_n
Packit 5c3484
#define DO_mpn_addlsh_n(dst,src,n,s,ws) mpn_addlsh_n(dst,dst,src,n,s)
Packit 5c3484
#else
Packit 5c3484
static mp_limb_t
Packit 5c3484
DO_mpn_addlsh_n(mp_ptr dst, mp_srcptr src, mp_size_t n, unsigned int s, mp_ptr ws)
Packit 5c3484
{
Packit 5c3484
#if USE_MUL_1 && 0
Packit 5c3484
  return mpn_addmul_1(dst,src,n,CNST_LIMB(1) <<(s));
Packit 5c3484
#else
Packit 5c3484
  mp_limb_t __cy;
Packit 5c3484
  __cy = mpn_lshift(ws,src,n,s);
Packit 5c3484
  return    __cy + mpn_add_n(dst,dst,ws,n);
Packit 5c3484
#endif
Packit 5c3484
}
Packit 5c3484
#endif
Packit 5c3484
Packit 5c3484
#if HAVE_NATIVE_mpn_subrsh
Packit 5c3484
#define DO_mpn_subrsh(dst,nd,src,ns,s,ws) mpn_subrsh(dst,nd,src,ns,s)
Packit 5c3484
#else
Packit 5c3484
/* FIXME: This is not a correct definition, it assumes no carry */
Packit 5c3484
#define DO_mpn_subrsh(dst,nd,src,ns,s,ws)				\
Packit 5c3484
do {									\
Packit 5c3484
  mp_limb_t __cy;							\
Packit 5c3484
  MPN_DECR_U (dst, nd, src[0] >> s);					\
Packit 5c3484
  __cy = DO_mpn_sublsh_n (dst, src + 1, ns - 1, GMP_NUMB_BITS - s, ws);	\
Packit 5c3484
  MPN_DECR_U (dst + ns - 1, nd - ns + 1, __cy);				\
Packit 5c3484
} while (0)
Packit 5c3484
#endif
Packit 5c3484
Packit 5c3484
Packit 5c3484
#if GMP_NUMB_BITS < 21
Packit 5c3484
#error Not implemented: Both sublsh_n(,,,20) should be corrected.
Packit 5c3484
#endif
Packit 5c3484
Packit 5c3484
#if GMP_NUMB_BITS < 16
Packit 5c3484
#error Not implemented: divexact_by42525 needs splitting.
Packit 5c3484
#endif
Packit 5c3484
Packit 5c3484
#if GMP_NUMB_BITS < 12
Packit 5c3484
#error Not implemented: Hard to adapt...
Packit 5c3484
#endif
Packit 5c3484
Packit 5c3484
/* FIXME: tuneup should decide the best variant */
Packit 5c3484
#ifndef AORSMUL_FASTER_AORS_AORSLSH
Packit 5c3484
#define AORSMUL_FASTER_AORS_AORSLSH 1
Packit 5c3484
#endif
Packit 5c3484
#ifndef AORSMUL_FASTER_AORS_2AORSLSH
Packit 5c3484
#define AORSMUL_FASTER_AORS_2AORSLSH 1
Packit 5c3484
#endif
Packit 5c3484
#ifndef AORSMUL_FASTER_2AORSLSH
Packit 5c3484
#define AORSMUL_FASTER_2AORSLSH 1
Packit 5c3484
#endif
Packit 5c3484
#ifndef AORSMUL_FASTER_3AORSLSH
Packit 5c3484
#define AORSMUL_FASTER_3AORSLSH 1
Packit 5c3484
#endif
Packit 5c3484
Packit 5c3484
#define BINVERT_9 \
Packit 5c3484
  ((((GMP_NUMB_MAX / 9) << (6 - GMP_NUMB_BITS % 6)) * 8 & GMP_NUMB_MAX) | 0x39)
Packit 5c3484
Packit 5c3484
#define BINVERT_255 \
Packit 5c3484
  (GMP_NUMB_MAX - ((GMP_NUMB_MAX / 255) << (8 - GMP_NUMB_BITS % 8)))
Packit 5c3484
Packit 5c3484
  /* FIXME: find some more general expressions for 2835^-1, 42525^-1 */
Packit 5c3484
#if GMP_LIMB_BITS == 32
Packit 5c3484
#define BINVERT_2835  (GMP_NUMB_MASK &		CNST_LIMB(0x53E3771B))
Packit 5c3484
#define BINVERT_42525 (GMP_NUMB_MASK &		CNST_LIMB(0x9F314C35))
Packit 5c3484
#else
Packit 5c3484
#if GMP_LIMB_BITS == 64
Packit 5c3484
#define BINVERT_2835  (GMP_NUMB_MASK &	CNST_LIMB(0x938CC70553E3771B))
Packit 5c3484
#define BINVERT_42525 (GMP_NUMB_MASK &	CNST_LIMB(0xE7B40D449F314C35))
Packit 5c3484
#endif
Packit 5c3484
#endif
Packit 5c3484
Packit 5c3484
#ifndef mpn_divexact_by255
Packit 5c3484
#if GMP_NUMB_BITS % 8 == 0
Packit 5c3484
#define mpn_divexact_by255(dst,src,size) \
Packit 5c3484
  (255 & 1 * mpn_bdiv_dbm1 (dst, src, size, __GMP_CAST (mp_limb_t, GMP_NUMB_MASK / 255)))
Packit 5c3484
#else
Packit 5c3484
#if HAVE_NATIVE_mpn_pi1_bdiv_q_1
Packit 5c3484
#define mpn_divexact_by255(dst,src,size) mpn_pi1_bdiv_q_1(dst,src,size,CNST_LIMB(255),BINVERT_255,0)
Packit 5c3484
#else
Packit 5c3484
#define mpn_divexact_by255(dst,src,size) mpn_divexact_1(dst,src,size,CNST_LIMB(255))
Packit 5c3484
#endif
Packit 5c3484
#endif
Packit 5c3484
#endif
Packit 5c3484
Packit 5c3484
#ifndef mpn_divexact_by9x4
Packit 5c3484
#if HAVE_NATIVE_mpn_pi1_bdiv_q_1
Packit 5c3484
#define mpn_divexact_by9x4(dst,src,size) mpn_pi1_bdiv_q_1(dst,src,size,CNST_LIMB(9),BINVERT_9,2)
Packit 5c3484
#else
Packit 5c3484
#define mpn_divexact_by9x4(dst,src,size) mpn_divexact_1(dst,src,size,CNST_LIMB(9)<<2)
Packit 5c3484
#endif
Packit 5c3484
#endif
Packit 5c3484
Packit 5c3484
#ifndef mpn_divexact_by42525
Packit 5c3484
#if HAVE_NATIVE_mpn_pi1_bdiv_q_1 && defined(BINVERT_42525)
Packit 5c3484
#define mpn_divexact_by42525(dst,src,size) mpn_pi1_bdiv_q_1(dst,src,size,CNST_LIMB(42525),BINVERT_42525,0)
Packit 5c3484
#else
Packit 5c3484
#define mpn_divexact_by42525(dst,src,size) mpn_divexact_1(dst,src,size,CNST_LIMB(42525))
Packit 5c3484
#endif
Packit 5c3484
#endif
Packit 5c3484
Packit 5c3484
#ifndef mpn_divexact_by2835x4
Packit 5c3484
#if HAVE_NATIVE_mpn_pi1_bdiv_q_1 && defined(BINVERT_2835)
Packit 5c3484
#define mpn_divexact_by2835x4(dst,src,size) mpn_pi1_bdiv_q_1(dst,src,size,CNST_LIMB(2835),BINVERT_2835,2)
Packit 5c3484
#else
Packit 5c3484
#define mpn_divexact_by2835x4(dst,src,size) mpn_divexact_1(dst,src,size,CNST_LIMB(2835)<<2)
Packit 5c3484
#endif
Packit 5c3484
#endif
Packit 5c3484
Packit 5c3484
/* Interpolation for Toom-6.5 (or Toom-6), using the evaluation
Packit 5c3484
   points: infinity(6.5 only), +-4, +-2, +-1, +-1/4, +-1/2, 0. More precisely,
Packit 5c3484
   we want to compute f(2^(GMP_NUMB_BITS * n)) for a polynomial f of
Packit 5c3484
   degree 11 (or 10), given the 12 (rsp. 11) values:
Packit 5c3484
Packit 5c3484
     r0 = limit at infinity of f(x) / x^7,
Packit 5c3484
     r1 = f(4),f(-4),
Packit 5c3484
     r2 = f(2),f(-2),
Packit 5c3484
     r3 = f(1),f(-1),
Packit 5c3484
     r4 = f(1/4),f(-1/4),
Packit 5c3484
     r5 = f(1/2),f(-1/2),
Packit 5c3484
     r6 = f(0).
Packit 5c3484
Packit 5c3484
   All couples of the form f(n),f(-n) must be already mixed with
Packit 5c3484
   toom_couple_handling(f(n),...,f(-n),...)
Packit 5c3484
Packit 5c3484
   The result is stored in {pp, spt + 7*n (or 6*n)}.
Packit 5c3484
   At entry, r6 is stored at {pp, 2n},
Packit 5c3484
   r4 is stored at {pp + 3n, 3n + 1}.
Packit 5c3484
   r2 is stored at {pp + 7n, 3n + 1}.
Packit 5c3484
   r0 is stored at {pp +11n, spt}.
Packit 5c3484
Packit 5c3484
   The other values are 3n+1 limbs each (with most significant limbs small).
Packit 5c3484
Packit 5c3484
   Negative intermediate results are stored two-complemented.
Packit 5c3484
   Inputs are destroyed.
Packit 5c3484
*/
Packit 5c3484
Packit 5c3484
void
Packit 5c3484
mpn_toom_interpolate_12pts (mp_ptr pp, mp_ptr r1, mp_ptr r3, mp_ptr r5,
Packit 5c3484
			mp_size_t n, mp_size_t spt, int half, mp_ptr wsi)
Packit 5c3484
{
Packit 5c3484
  mp_limb_t cy;
Packit 5c3484
  mp_size_t n3;
Packit 5c3484
  mp_size_t n3p1;
Packit 5c3484
  n3 = 3 * n;
Packit 5c3484
  n3p1 = n3 + 1;
Packit 5c3484
Packit 5c3484
#define   r4    (pp + n3)			/* 3n+1 */
Packit 5c3484
#define   r2    (pp + 7 * n)			/* 3n+1 */
Packit 5c3484
#define   r0    (pp +11 * n)			/* s+t <= 2*n */
Packit 5c3484
Packit 5c3484
  /******************************* interpolation *****************************/
Packit 5c3484
  if (half != 0) {
Packit 5c3484
    cy = mpn_sub_n (r3, r3, r0, spt);
Packit 5c3484
    MPN_DECR_U (r3 + spt, n3p1 - spt, cy);
Packit 5c3484
Packit 5c3484
    cy = DO_mpn_sublsh_n (r2, r0, spt, 10, wsi);
Packit 5c3484
    MPN_DECR_U (r2 + spt, n3p1 - spt, cy);
Packit 5c3484
    DO_mpn_subrsh(r5, n3p1, r0, spt, 2, wsi);
Packit 5c3484
Packit 5c3484
    cy = DO_mpn_sublsh_n (r1, r0, spt, 20, wsi);
Packit 5c3484
    MPN_DECR_U (r1 + spt, n3p1 - spt, cy);
Packit 5c3484
    DO_mpn_subrsh(r4, n3p1, r0, spt, 4, wsi);
Packit 5c3484
  };
Packit 5c3484
Packit 5c3484
  r4[n3] -= DO_mpn_sublsh_n (r4 + n, pp, 2 * n, 20, wsi);
Packit 5c3484
  DO_mpn_subrsh(r1 + n, 2 * n + 1, pp, 2 * n, 4, wsi);
Packit 5c3484
Packit 5c3484
#if HAVE_NATIVE_mpn_add_n_sub_n
Packit 5c3484
  mpn_add_n_sub_n (r1, r4, r4, r1, n3p1);
Packit 5c3484
#else
Packit 5c3484
  ASSERT_NOCARRY(mpn_add_n (wsi, r1, r4, n3p1));
Packit 5c3484
  mpn_sub_n (r4, r4, r1, n3p1); /* can be negative */
Packit 5c3484
  MP_PTR_SWAP(r1, wsi);
Packit 5c3484
#endif
Packit 5c3484
Packit 5c3484
  r5[n3] -= DO_mpn_sublsh_n (r5 + n, pp, 2 * n, 10, wsi);
Packit 5c3484
  DO_mpn_subrsh(r2 + n, 2 * n + 1, pp, 2 * n, 2, wsi);
Packit 5c3484
Packit 5c3484
#if HAVE_NATIVE_mpn_add_n_sub_n
Packit 5c3484
  mpn_add_n_sub_n (r2, r5, r5, r2, n3p1);
Packit 5c3484
#else
Packit 5c3484
  mpn_sub_n (wsi, r5, r2, n3p1); /* can be negative */
Packit 5c3484
  ASSERT_NOCARRY(mpn_add_n (r2, r2, r5, n3p1));
Packit 5c3484
  MP_PTR_SWAP(r5, wsi);
Packit 5c3484
#endif
Packit 5c3484
Packit 5c3484
  r3[n3] -= mpn_sub_n (r3+n, r3+n, pp, 2 * n);
Packit 5c3484
Packit 5c3484
#if AORSMUL_FASTER_AORS_AORSLSH
Packit 5c3484
  mpn_submul_1 (r4, r5, n3p1, 257); /* can be negative */
Packit 5c3484
#else
Packit 5c3484
  mpn_sub_n (r4, r4, r5, n3p1); /* can be negative */
Packit 5c3484
  DO_mpn_sublsh_n (r4, r5, n3p1, 8, wsi); /* can be negative */
Packit 5c3484
#endif
Packit 5c3484
  /* A division by 2835x4 follows. Warning: the operand can be negative! */
Packit 5c3484
  mpn_divexact_by2835x4(r4, r4, n3p1);
Packit 5c3484
  if ((r4[n3] & (GMP_NUMB_MAX << (GMP_NUMB_BITS-3))) != 0)
Packit 5c3484
    r4[n3] |= (GMP_NUMB_MAX << (GMP_NUMB_BITS-2));
Packit 5c3484
Packit 5c3484
#if AORSMUL_FASTER_2AORSLSH
Packit 5c3484
  mpn_addmul_1 (r5, r4, n3p1, 60); /* can be negative */
Packit 5c3484
#else
Packit 5c3484
  DO_mpn_sublsh_n (r5, r4, n3p1, 2, wsi); /* can be negative */
Packit 5c3484
  DO_mpn_addlsh_n (r5, r4, n3p1, 6, wsi); /* can give a carry */
Packit 5c3484
#endif
Packit 5c3484
  mpn_divexact_by255(r5, r5, n3p1);
Packit 5c3484
Packit 5c3484
  ASSERT_NOCARRY(DO_mpn_sublsh_n (r2, r3, n3p1, 5, wsi));
Packit 5c3484
Packit 5c3484
#if AORSMUL_FASTER_3AORSLSH
Packit 5c3484
  ASSERT_NOCARRY(mpn_submul_1 (r1, r2, n3p1, 100));
Packit 5c3484
#else
Packit 5c3484
  ASSERT_NOCARRY(DO_mpn_sublsh_n (r1, r2, n3p1, 6, wsi));
Packit 5c3484
  ASSERT_NOCARRY(DO_mpn_sublsh_n (r1, r2, n3p1, 5, wsi));
Packit 5c3484
  ASSERT_NOCARRY(DO_mpn_sublsh_n (r1, r2, n3p1, 2, wsi));
Packit 5c3484
#endif
Packit 5c3484
  ASSERT_NOCARRY(DO_mpn_sublsh_n (r1, r3, n3p1, 9, wsi));
Packit 5c3484
  mpn_divexact_by42525(r1, r1, n3p1);
Packit 5c3484
Packit 5c3484
#if AORSMUL_FASTER_AORS_2AORSLSH
Packit 5c3484
  ASSERT_NOCARRY(mpn_submul_1 (r2, r1, n3p1, 225));
Packit 5c3484
#else
Packit 5c3484
  ASSERT_NOCARRY(mpn_sub_n (r2, r2, r1, n3p1));
Packit 5c3484
  ASSERT_NOCARRY(DO_mpn_addlsh_n (r2, r1, n3p1, 5, wsi));
Packit 5c3484
  ASSERT_NOCARRY(DO_mpn_sublsh_n (r2, r1, n3p1, 8, wsi));
Packit 5c3484
#endif
Packit 5c3484
  mpn_divexact_by9x4(r2, r2, n3p1);
Packit 5c3484
Packit 5c3484
  ASSERT_NOCARRY(mpn_sub_n (r3, r3, r2, n3p1));
Packit 5c3484
Packit 5c3484
  mpn_sub_n (r4, r2, r4, n3p1);
Packit 5c3484
  ASSERT_NOCARRY(mpn_rshift(r4, r4, n3p1, 1));
Packit 5c3484
  ASSERT_NOCARRY(mpn_sub_n (r2, r2, r4, n3p1));
Packit 5c3484
Packit 5c3484
  mpn_add_n (r5, r5, r1, n3p1);
Packit 5c3484
  ASSERT_NOCARRY(mpn_rshift(r5, r5, n3p1, 1));
Packit 5c3484
Packit 5c3484
  /* last interpolation steps... */
Packit 5c3484
  ASSERT_NOCARRY(mpn_sub_n (r3, r3, r1, n3p1));
Packit 5c3484
  ASSERT_NOCARRY(mpn_sub_n (r1, r1, r5, n3p1));
Packit 5c3484
  /* ... could be mixed with recomposition
Packit 5c3484
	||H-r5|M-r5|L-r5|   ||H-r1|M-r1|L-r1|
Packit 5c3484
  */
Packit 5c3484
Packit 5c3484
  /***************************** recomposition *******************************/
Packit 5c3484
  /*
Packit 5c3484
    pp[] prior to operations:
Packit 5c3484
    |M r0|L r0|___||H r2|M r2|L r2|___||H r4|M r4|L r4|____|H_r6|L r6|pp
Packit 5c3484
Packit 5c3484
    summation scheme for remaining operations:
Packit 5c3484
    |__12|n_11|n_10|n__9|n__8|n__7|n__6|n__5|n__4|n__3|n__2|n___|n___|pp
Packit 5c3484
    |M r0|L r0|___||H r2|M r2|L r2|___||H r4|M r4|L r4|____|H_r6|L r6|pp
Packit 5c3484
	||H r1|M r1|L r1|   ||H r3|M r3|L r3|   ||H_r5|M_r5|L_r5|
Packit 5c3484
  */
Packit 5c3484
Packit 5c3484
  cy = mpn_add_n (pp + n, pp + n, r5, n);
Packit 5c3484
  cy = mpn_add_1 (pp + 2 * n, r5 + n, n, cy);
Packit 5c3484
#if HAVE_NATIVE_mpn_add_nc
Packit 5c3484
  cy = r5[n3] + mpn_add_nc(pp + n3, pp + n3, r5 + 2 * n, n, cy);
Packit 5c3484
#else
Packit 5c3484
  MPN_INCR_U (r5 + 2 * n, n + 1, cy);
Packit 5c3484
  cy = r5[n3] + mpn_add_n (pp + n3, pp + n3, r5 + 2 * n, n);
Packit 5c3484
#endif
Packit 5c3484
  MPN_INCR_U (pp + n3 + n, 2 * n + 1, cy);
Packit 5c3484
Packit 5c3484
  pp[2 * n3]+= mpn_add_n (pp + 5 * n, pp + 5 * n, r3, n);
Packit 5c3484
  cy = mpn_add_1 (pp + 2 * n3, r3 + n, n, pp[2 * n3]);
Packit 5c3484
#if HAVE_NATIVE_mpn_add_nc
Packit 5c3484
  cy = r3[n3] + mpn_add_nc(pp + 7 * n, pp + 7 * n, r3 + 2 * n, n, cy);
Packit 5c3484
#else
Packit 5c3484
  MPN_INCR_U (r3 + 2 * n, n + 1, cy);
Packit 5c3484
  cy = r3[n3] + mpn_add_n (pp + 7 * n, pp + 7 * n, r3 + 2 * n, n);
Packit 5c3484
#endif
Packit 5c3484
  MPN_INCR_U (pp + 8 * n, 2 * n + 1, cy);
Packit 5c3484
Packit 5c3484
  pp[10*n]+=mpn_add_n (pp + 9 * n, pp + 9 * n, r1, n);
Packit 5c3484
  if (half) {
Packit 5c3484
    cy = mpn_add_1 (pp + 10 * n, r1 + n, n, pp[10 * n]);
Packit 5c3484
#if HAVE_NATIVE_mpn_add_nc
Packit 5c3484
    if (LIKELY (spt > n)) {
Packit 5c3484
      cy = r1[n3] + mpn_add_nc(pp + 11 * n, pp + 11 * n, r1 + 2 * n, n, cy);
Packit 5c3484
      MPN_INCR_U (pp + 4 * n3, spt - n, cy);
Packit 5c3484
    } else {
Packit 5c3484
      ASSERT_NOCARRY(mpn_add_nc(pp + 11 * n, pp + 11 * n, r1 + 2 * n, spt, cy));
Packit 5c3484
    }
Packit 5c3484
#else
Packit 5c3484
    MPN_INCR_U (r1 + 2 * n, n + 1, cy);
Packit 5c3484
    if (LIKELY (spt > n)) {
Packit 5c3484
      cy = r1[n3] + mpn_add_n (pp + 11 * n, pp + 11 * n, r1 + 2 * n, n);
Packit 5c3484
      MPN_INCR_U (pp + 4 * n3, spt - n, cy);
Packit 5c3484
    } else {
Packit 5c3484
      ASSERT_NOCARRY(mpn_add_n (pp + 11 * n, pp + 11 * n, r1 + 2 * n, spt));
Packit 5c3484
    }
Packit 5c3484
#endif
Packit 5c3484
  } else {
Packit 5c3484
    ASSERT_NOCARRY(mpn_add_1 (pp + 10 * n, r1 + n, spt, pp[10 * n]));
Packit 5c3484
  }
Packit 5c3484
Packit 5c3484
#undef   r0
Packit 5c3484
#undef   r2
Packit 5c3484
#undef   r4
Packit 5c3484
}