gmp

changeset 12741:674bf2af029b

Rename mpn_addsub_n to mpn_add_n_sub_n.
author Torbjorn Granlund <tege@gmplib.org>
date Sun, 04 Oct 2009 00:01:37 +0200
parents c19f605cc33b
children c7cd79acfe97
files ChangeLog configure.in gmp-impl.h mpn/asm-defs.m4 mpn/generic/addsub_n.c mpn/generic/mul_fft.c mpn/generic/toom32_mul.c mpn/generic/toom33_mul.c mpn/generic/toom3_sqr.c mpn/generic/toom42_mul.c mpn/generic/toom43_mul.c mpn/generic/toom44_mul.c mpn/generic/toom4_sqr.c mpn/generic/toom52_mul.c mpn/generic/toom53_mul.c mpn/generic/toom62_mul.c mpn/generic/toom_eval_dgr3_pm1.c mpn/x86_64/redc_1.asm mpz/fib_ui.c tests/devel/Makefile.am tests/devel/addsub_n.c tests/devel/addsub_n_2.c tests/devel/try.c tests/refmpn.c tests/tests.h tune/common.c tune/many.pl tune/speed.c tune/speed.h
diffstat 29 files changed, 131 insertions(+), 127 deletions(-) [+]
line diff
     1.1 --- a/ChangeLog	Sat Oct 03 23:26:01 2009 +0200
     1.2 +++ b/ChangeLog	Sun Oct 04 00:01:37 2009 +0200
     1.3 @@ -1,3 +1,7 @@
     1.4 +2009-10-03  Torbjorn Granlund  <tege@gmplib.org>
     1.5 +
     1.6 +	* Rename mpn_addsub_n to mpn_add_n_sub_n.
     1.7 +
     1.8  2009-10-01  Torbjorn Granlund  <tege@gmplib.org>
     1.9  
    1.10  	* mpn/generic/tdiv_qr.c: Call mpn_divrem_1 and mpn_dc_div_qr instead of
     2.1 --- a/configure.in	Sat Oct 03 23:26:01 2009 +0200
     2.2 +++ b/configure.in	Sun Oct 04 00:01:37 2009 +0200
     2.3 @@ -2430,7 +2430,7 @@
     2.4    mul_2 mul_3 mul_4							\
     2.5    addmul_2 addmul_3 addmul_4 addmul_5 addmul_6 addmul_7 addmul_8	\
     2.6    addlsh1_n sublsh1_n rsblsh1_n rsh1add_n rsh1sub_n			\
     2.7 -  addsub_n addaddmul_1msb0 lshiftc"
     2.8 +  add_n_sub_n addaddmul_1msb0 lshiftc"
     2.9  
    2.10  gmp_mpn_functions="$extra_functions					   \
    2.11    add add_1 add_n sub sub_1 sub_n neg_n mul_1 addmul_1			   \
    2.12 @@ -2915,7 +2915,7 @@
    2.13  #undef HAVE_NATIVE_mpn_addmul_6
    2.14  #undef HAVE_NATIVE_mpn_addmul_7
    2.15  #undef HAVE_NATIVE_mpn_addmul_8
    2.16 -#undef HAVE_NATIVE_mpn_addsub_n
    2.17 +#undef HAVE_NATIVE_mpn_add_n_sub_n
    2.18  #undef HAVE_NATIVE_mpn_addaddmul_1msb0
    2.19  #undef HAVE_NATIVE_mpn_and_n
    2.20  #undef HAVE_NATIVE_mpn_andn_n
     3.1 --- a/gmp-impl.h	Sat Oct 03 23:26:01 2009 +0200
     3.2 +++ b/gmp-impl.h	Sun Oct 04 00:01:37 2009 +0200
     3.3 @@ -826,11 +826,11 @@
     3.4  #define mpn_lshiftc __MPN(lshiftc)
     3.5  __GMP_DECLSPEC mp_limb_t mpn_lshiftc __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, unsigned int));
     3.6  
     3.7 -#define mpn_addsub_n __MPN(addsub_n)
     3.8 -__GMP_DECLSPEC mp_limb_t mpn_addsub_n __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_srcptr, mp_size_t));
     3.9 -
    3.10 -#define mpn_addsub_nc __MPN(addsub_nc)
    3.11 -__GMP_DECLSPEC mp_limb_t mpn_addsub_nc __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_limb_t));
    3.12 +#define mpn_add_n_sub_n __MPN(add_n_sub_n)
    3.13 +__GMP_DECLSPEC mp_limb_t mpn_add_n_sub_n __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_srcptr, mp_size_t));
    3.14 +
    3.15 +#define mpn_add_n_sub_nc __MPN(add_n_sub_nc)
    3.16 +__GMP_DECLSPEC mp_limb_t mpn_add_n_sub_nc __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_limb_t));
    3.17  
    3.18  #define mpn_addaddmul_1msb0 __MPN(addaddmul_1msb0)
    3.19  __GMP_DECLSPEC mp_limb_t mpn_addaddmul_1msb0 __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t));
     4.1 --- a/mpn/asm-defs.m4	Sat Oct 03 23:26:01 2009 +0200
     4.2 +++ b/mpn/asm-defs.m4	Sun Oct 04 00:01:37 2009 +0200
     4.3 @@ -1309,8 +1309,8 @@
     4.4  define_mpn(addmul_2)
     4.5  define_mpn(addmul_3)
     4.6  define_mpn(addmul_4)
     4.7 -define_mpn(addsub_n)
     4.8 -define_mpn(addsub_nc)
     4.9 +define_mpn(add_n_sub_n)
    4.10 +define_mpn(add_n_sub_nc)
    4.11  define_mpn(addaddmul_1msb0)
    4.12  define_mpn(and_n)
    4.13  define_mpn(andn_n)
     5.1 --- a/mpn/generic/addsub_n.c	Sat Oct 03 23:26:01 2009 +0200
     5.2 +++ b/mpn/generic/addsub_n.c	Sun Oct 04 00:01:37 2009 +0200
     5.3 @@ -1,4 +1,4 @@
     5.4 -/* mpn_addsub_n -- Add and Subtract two limb vectors of equal, non-zero length.
     5.5 +/* mpn_add_n_sub_n -- Add and Subtract two limb vectors of equal, non-zero length.
     5.6  
     5.7     THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE.  IT IS ONLY
     5.8     SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES.  IN FACT, IT IS ALMOST
     5.9 @@ -31,13 +31,13 @@
    5.10  #define PART_SIZE (L1_CACHE_SIZE / BYTES_PER_MP_LIMB / 6)
    5.11  
    5.12  
    5.13 -/* mpn_addsub_n.
    5.14 +/* mpn_add_n_sub_n.
    5.15     r1[] = s1[] + s2[]
    5.16     r2[] = s1[] - s2[]
    5.17     All operands have n limbs.
    5.18     In-place operations allowed.  */
    5.19  mp_limb_t
    5.20 -mpn_addsub_n (mp_ptr r1p, mp_ptr r2p, mp_srcptr s1p, mp_srcptr s2p, mp_size_t n)
    5.21 +mpn_add_n_sub_n (mp_ptr r1p, mp_ptr r2p, mp_srcptr s1p, mp_srcptr s2p, mp_size_t n)
    5.22  {
    5.23    mp_limb_t acyn, acyo;		/* carry for add */
    5.24    mp_limb_t scyn, scyo;		/* carry for subtract */
    5.25 @@ -148,13 +148,13 @@
    5.26    s2p = malloc (n * BYTES_PER_MP_LIMB);
    5.27    TIME (t,(mpn_add_n(r1p,s1p,s2p,n),mpn_sub_n(r1p,s1p,s2p,n)));
    5.28    printf ("              separate add and sub: %.3f\n", t);
    5.29 -  TIME (t,mpn_addsub_n(r1p,r2p,s1p,s2p,n));
    5.30 +  TIME (t,mpn_add_n_sub_n(r1p,r2p,s1p,s2p,n));
    5.31    printf ("combined addsub separate variables: %.3f\n", t);
    5.32 -  TIME (t,mpn_addsub_n(r1p,r2p,r1p,s2p,n));
    5.33 +  TIME (t,mpn_add_n_sub_n(r1p,r2p,r1p,s2p,n));
    5.34    printf ("        combined addsub r1 overlap: %.3f\n", t);
    5.35 -  TIME (t,mpn_addsub_n(r1p,r2p,r1p,s2p,n));
    5.36 +  TIME (t,mpn_add_n_sub_n(r1p,r2p,r1p,s2p,n));
    5.37    printf ("        combined addsub r2 overlap: %.3f\n", t);
    5.38 -  TIME (t,mpn_addsub_n(r1p,r2p,r1p,r2p,n));
    5.39 +  TIME (t,mpn_add_n_sub_n(r1p,r2p,r1p,r2p,n));
    5.40    printf ("          combined addsub in-place: %.3f\n", t);
    5.41  
    5.42    return 0;
     6.1 --- a/mpn/generic/mul_fft.c	Sat Oct 03 23:26:01 2009 +0200
     6.2 +++ b/mpn/generic/mul_fft.c	Sun Oct 04 00:01:37 2009 +0200
     6.3 @@ -60,8 +60,8 @@
     6.4  #include "gmp-impl.h"
     6.5  
     6.6  #ifdef WANT_ADDSUB
     6.7 -#include "generic/addsub_n.c"
     6.8 -#define HAVE_NATIVE_mpn_addsub_n 1
     6.9 +#include "generic/add_n_sub_n.c"
    6.10 +#define HAVE_NATIVE_mpn_add_n_sub_n 1
    6.11  #endif
    6.12  
    6.13  static void mpn_mul_fft_internal
    6.14 @@ -387,8 +387,8 @@
    6.15    if (K == 2)
    6.16      {
    6.17        mp_limb_t cy;
    6.18 -#if HAVE_NATIVE_mpn_addsub_n
    6.19 -      cy = mpn_addsub_n (Ap[0], Ap[inc], Ap[0], Ap[inc], n + 1) & 1;
    6.20 +#if HAVE_NATIVE_mpn_add_n_sub_n
    6.21 +      cy = mpn_add_n_sub_n (Ap[0], Ap[inc], Ap[0], Ap[inc], n + 1) & 1;
    6.22  #else
    6.23        MPN_COPY (tp, Ap[0], n + 1);
    6.24        mpn_add_n (Ap[0], Ap[0], Ap[inc], n + 1);
    6.25 @@ -562,8 +562,8 @@
    6.26    if (K == 2)
    6.27      {
    6.28        mp_limb_t cy;
    6.29 -#if HAVE_NATIVE_mpn_addsub_n
    6.30 -      cy = mpn_addsub_n (Ap[0], Ap[1], Ap[0], Ap[1], n + 1) & 1;
    6.31 +#if HAVE_NATIVE_mpn_add_n_sub_n
    6.32 +      cy = mpn_add_n_sub_n (Ap[0], Ap[1], Ap[0], Ap[1], n + 1) & 1;
    6.33  #else
    6.34        MPN_COPY (tp, Ap[0], n + 1);
    6.35        mpn_add_n (Ap[0], Ap[0], Ap[1], n + 1);
    6.36 @@ -980,8 +980,8 @@
    6.37    /* 0 <= cc <= 1 */
    6.38    /* now lambda-mu = {pad_op, pl2} - cc mod 2^(pl2*GMP_NUMB_BITS)+1 */
    6.39    oldcc = cc;
    6.40 -#if HAVE_NATIVE_mpn_addsub_n
    6.41 -  c2 = mpn_addsub_n (pad_op + l, pad_op, pad_op, pad_op + l, l);
    6.42 +#if HAVE_NATIVE_mpn_add_n_sub_n
    6.43 +  c2 = mpn_add_n_sub_n (pad_op + l, pad_op, pad_op, pad_op + l, l);
    6.44    /* c2 & 1 is the borrow, c2 & 2 is the carry */
    6.45    cc += c2 >> 1; /* carry out from high <- low + high */
    6.46    c2 = c2 & 1; /* borrow out from low <- low - high */
     7.1 --- a/mpn/generic/toom32_mul.c	Sat Oct 03 23:26:01 2009 +0200
     7.2 +++ b/mpn/generic/toom32_mul.c	Sun Oct 04 00:01:37 2009 +0200
     7.3 @@ -83,16 +83,16 @@
     7.4  
     7.5    /* Compute as1 and asm1.  */
     7.6    asm1[n] = mpn_add (a0_a2, a0, n, a2, s);
     7.7 -#if HAVE_NATIVE_mpn_addsub_n
     7.8 +#if HAVE_NATIVE_mpn_add_n_sub_n
     7.9    if (asm1[n] == 0 && mpn_cmp (a0_a2, a1, n) < 0)
    7.10      {
    7.11 -      cy = mpn_addsub_n (as1, asm1, a1, a0_a2, n);
    7.12 +      cy = mpn_add_n_sub_n (as1, asm1, a1, a0_a2, n);
    7.13        as1[n] = cy >> 1;
    7.14        vm1_neg = 1;
    7.15      }
    7.16    else
    7.17      {
    7.18 -      cy = mpn_addsub_n (as1, asm1, a0_a2, a1, n);
    7.19 +      cy = mpn_add_n_sub_n (as1, asm1, a0_a2, a1, n);
    7.20        as1[n] = asm1[n] + (cy >> 1);
    7.21        asm1[n]-= cy & 1;
    7.22        vm1_neg = 0;
    7.23 @@ -115,15 +115,15 @@
    7.24    /* Compute bs1 and bsm1.  */
    7.25    if (t == n)
    7.26      {
    7.27 -#if HAVE_NATIVE_mpn_addsub_n
    7.28 +#if HAVE_NATIVE_mpn_add_n_sub_n
    7.29        if (mpn_cmp (b0, b1, n) < 0)
    7.30  	{
    7.31 -	  cy = mpn_addsub_n (bs1, bsm1, b1, b0, n);
    7.32 +	  cy = mpn_add_n_sub_n (bs1, bsm1, b1, b0, n);
    7.33  	  vm1_neg ^= 1;
    7.34  	}
    7.35        else
    7.36  	{
    7.37 -	  cy = mpn_addsub_n (bs1, bsm1, b0, b1, n);
    7.38 +	  cy = mpn_add_n_sub_n (bs1, bsm1, b0, b1, n);
    7.39  	}
    7.40        bs1[n] = cy >> 1;
    7.41  #else
     8.1 --- a/mpn/generic/toom33_mul.c	Sat Oct 03 23:26:01 2009 +0200
     8.2 +++ b/mpn/generic/toom33_mul.c	Sun Oct 04 00:01:37 2009 +0200
     8.3 @@ -113,17 +113,17 @@
     8.4  
     8.5    /* Compute as1 and asm1.  */
     8.6    cy = mpn_add (gp, a0, n, a2, s);
     8.7 -#if HAVE_NATIVE_mpn_addsub_n
     8.8 +#if HAVE_NATIVE_mpn_add_n_sub_n
     8.9    if (cy == 0 && mpn_cmp (gp, a1, n) < 0)
    8.10      {
    8.11 -      cy = mpn_addsub_n (as1, asm1, a1, gp, n);
    8.12 +      cy = mpn_add_n_sub_n (as1, asm1, a1, gp, n);
    8.13        as1[n] = 0;
    8.14        asm1[n] = 0;
    8.15        vm1_neg = 1;
    8.16      }
    8.17    else
    8.18      {
    8.19 -      cy2 = mpn_addsub_n (as1, asm1, gp, a1, n);
    8.20 +      cy2 = mpn_add_n_sub_n (as1, asm1, gp, a1, n);
    8.21        as1[n] = cy + (cy2 >> 1);
    8.22        asm1[n] = cy - (cy & 1);
    8.23      }
    8.24 @@ -160,17 +160,17 @@
    8.25  
    8.26    /* Compute bs1 and bsm1.  */
    8.27    cy = mpn_add (gp, b0, n, b2, t);
    8.28 -#if HAVE_NATIVE_mpn_addsub_n
    8.29 +#if HAVE_NATIVE_mpn_add_n_sub_n
    8.30    if (cy == 0 && mpn_cmp (gp, b1, n) < 0)
    8.31      {
    8.32 -      cy = mpn_addsub_n (bs1, bsm1, b1, gp, n);
    8.33 +      cy = mpn_add_n_sub_n (bs1, bsm1, b1, gp, n);
    8.34        bs1[n] = 0;
    8.35        bsm1[n] = 0;
    8.36        vm1_neg ^= 1;
    8.37      }
    8.38    else
    8.39      {
    8.40 -      cy2 = mpn_addsub_n (bs1, bsm1, gp, b1, n);
    8.41 +      cy2 = mpn_add_n_sub_n (bs1, bsm1, gp, b1, n);
    8.42        bs1[n] = cy + (cy2 >> 1);
    8.43        bsm1[n] = cy - (cy & 1);
    8.44      }
     9.1 --- a/mpn/generic/toom3_sqr.c	Sat Oct 03 23:26:01 2009 +0200
     9.2 +++ b/mpn/generic/toom3_sqr.c	Sun Oct 04 00:01:37 2009 +0200
     9.3 @@ -94,16 +94,16 @@
     9.4  
     9.5    /* Compute as1 and asm1.  */
     9.6    cy = mpn_add (gp, a0, n, a2, s);
     9.7 -#if HAVE_NATIVE_mpn_addsub_n
     9.8 +#if HAVE_NATIVE_mpn_add_n_sub_n
     9.9    if (cy == 0 && mpn_cmp (gp, a1, n) < 0)
    9.10      {
    9.11 -      cy = mpn_addsub_n (as1, asm1, a1, gp, n);
    9.12 +      cy = mpn_add_n_sub_n (as1, asm1, a1, gp, n);
    9.13        as1[n] = 0;
    9.14        asm1[n] = 0;
    9.15      }
    9.16    else
    9.17      {
    9.18 -      cy2 = mpn_addsub_n (as1, asm1, gp, a1, n);
    9.19 +      cy2 = mpn_add_n_sub_n (as1, asm1, gp, a1, n);
    9.20        as1[n] = cy + (cy2 >> 1);
    9.21        asm1[n] = cy - (cy & 1);
    9.22      }
    10.1 --- a/mpn/generic/toom42_mul.c	Sat Oct 03 23:26:01 2009 +0200
    10.2 +++ b/mpn/generic/toom42_mul.c	Sun Oct 04 00:01:37 2009 +0200
    10.3 @@ -97,15 +97,15 @@
    10.4    /* Compute as1 and asm1.  */
    10.5    a0_a2[n] = mpn_add_n (a0_a2, a0, a2, n);
    10.6    a1_a3[n] = mpn_add (a1_a3, a1, n, a3, s);
    10.7 -#if HAVE_NATIVE_mpn_addsub_n
    10.8 +#if HAVE_NATIVE_mpn_add_n_sub_n
    10.9    if (mpn_cmp (a0_a2, a1_a3, n + 1) < 0)
   10.10      {
   10.11 -      mpn_addsub_n (as1, asm1, a1_a3, a0_a2, n + 1);
   10.12 +      mpn_add_n_sub_n (as1, asm1, a1_a3, a0_a2, n + 1);
   10.13        vm1_neg = 1;
   10.14      }
   10.15    else
   10.16      {
   10.17 -      mpn_addsub_n (as1, asm1, a0_a2, a1_a3, n + 1);
   10.18 +      mpn_add_n_sub_n (as1, asm1, a0_a2, a1_a3, n + 1);
   10.19        vm1_neg = 0;
   10.20      }
   10.21  #else
   10.22 @@ -144,15 +144,15 @@
   10.23    /* Compute bs1 and bsm1.  */
   10.24    if (t == n)
   10.25      {
   10.26 -#if HAVE_NATIVE_mpn_addsub_n
   10.27 +#if HAVE_NATIVE_mpn_add_n_sub_n
   10.28        if (mpn_cmp (b0, b1, n) < 0)
   10.29  	{
   10.30 -	  cy = mpn_addsub_n (bs1, bsm1, b1, b0, n);
   10.31 +	  cy = mpn_add_n_sub_n (bs1, bsm1, b1, b0, n);
   10.32  	  vm1_neg ^= 1;
   10.33  	}
   10.34        else
   10.35  	{
   10.36 -	  cy = mpn_addsub_n (bs1, bsm1, b0, b1, n);
   10.37 +	  cy = mpn_add_n_sub_n (bs1, bsm1, b0, b1, n);
   10.38  	}
   10.39        bs1[n] = cy >> 1;
   10.40  #else
    11.1 --- a/mpn/generic/toom43_mul.c	Sat Oct 03 23:26:01 2009 +0200
    11.2 +++ b/mpn/generic/toom43_mul.c	Sun Oct 04 00:01:37 2009 +0200
    11.3 @@ -133,15 +133,15 @@
    11.4    cy = mpn_lshift (asm2, a2, n, 2);			/*      4a2           */
    11.5    a0a2[n] = cy + mpn_add_n (a0a2, a0, asm2, n);		/*      4a2      + a0 */
    11.6  
    11.7 -#if HAVE_NATIVE_mpn_addsub_n
    11.8 +#if HAVE_NATIVE_mpn_add_n_sub_n
    11.9    if (mpn_cmp (a0a2, a1a3, n+1) < 0)
   11.10      {
   11.11 -      mpn_addsub_n (as2, asm2, a1a3, a0a2, n+1);
   11.12 +      mpn_add_n_sub_n (as2, asm2, a1a3, a0a2, n+1);
   11.13        flags ^= toom6_vm2_neg;
   11.14      }
   11.15    else
   11.16      {
   11.17 -      mpn_addsub_n (as2, asm2, a0a2, a1a3, n+1);
   11.18 +      mpn_add_n_sub_n (as2, asm2, a0a2, a1a3, n+1);
   11.19      }
   11.20  #else
   11.21    mpn_add_n (as2, a0a2, a1a3, n+1);
   11.22 @@ -164,15 +164,15 @@
   11.23      cy = mpn_add_1 (b0b2 + t, b0 + t, n - t, cy);
   11.24    b0b2[n] = cy;
   11.25  
   11.26 -#if HAVE_NATIVE_mpn_addsub_n
   11.27 +#if HAVE_NATIVE_mpn_add_n_sub_n
   11.28    if (mpn_cmp (b0b2, b1d, n+1) < 0)
   11.29      {
   11.30 -      mpn_addsub_n (bs2, bsm2, b1d, b0b2, n+1);
   11.31 +      mpn_add_n_sub_n (bs2, bsm2, b1d, b0b2, n+1);
   11.32        flags ^= toom6_vm2_neg;
   11.33      }
   11.34    else
   11.35      {
   11.36 -      mpn_addsub_n (bs2, bsm2, b0b2, b1d, n+1);
   11.37 +      mpn_add_n_sub_n (bs2, bsm2, b0b2, b1d, n+1);
   11.38      }
   11.39  #else
   11.40    mpn_add_n (bs2, b0b2, b1d, n+1);
   11.41 @@ -190,15 +190,15 @@
   11.42    /* Compute as1 and asm1.  */
   11.43    a0a2[n] = mpn_add_n (a0a2, a0, a2, n);
   11.44    asm1[n] = mpn_add (asm1, a1, n, a3, s);
   11.45 -#if HAVE_NATIVE_mpn_addsub_n
   11.46 +#if HAVE_NATIVE_mpn_add_n_sub_n
   11.47    if (mpn_cmp (a0a2, asm1, n+1) < 0)
   11.48      {
   11.49 -      cy = mpn_addsub_n (as1, asm1, asm1, a0a2, n+1);
   11.50 +      cy = mpn_add_n_sub_n (as1, asm1, asm1, a0a2, n+1);
   11.51        flags ^= toom6_vm1_neg;
   11.52      }
   11.53    else
   11.54      {
   11.55 -      cy = mpn_addsub_n (as1, asm1, a0a2, asm1, n+1);
   11.56 +      cy = mpn_add_n_sub_n (as1, asm1, a0a2, asm1, n+1);
   11.57      }
   11.58  #else
   11.59    mpn_add_n (as1, a0a2, asm1, n+1);
   11.60 @@ -215,16 +215,16 @@
   11.61  
   11.62    /* Compute bs1 and bsm1.  */
   11.63    bsm1[n] = mpn_add (bsm1, b0, n, b2, t);
   11.64 -#if HAVE_NATIVE_mpn_addsub_n
   11.65 +#if HAVE_NATIVE_mpn_add_n_sub_n
   11.66    if (bsm1[n] == 0 && mpn_cmp (bsm1, b1, n) < 0)
   11.67      {
   11.68 -      cy = mpn_addsub_n (bs1, bsm1, b1, bsm1, n);
   11.69 +      cy = mpn_add_n_sub_n (bs1, bsm1, b1, bsm1, n);
   11.70        bs1[n] = cy >> 1;
   11.71        flags ^= toom6_vm1_neg;
   11.72      }
   11.73    else
   11.74      {
   11.75 -      cy = mpn_addsub_n (bs1, bsm1, bsm1, b1, n);
   11.76 +      cy = mpn_add_n_sub_n (bs1, bsm1, bsm1, b1, n);
   11.77        bs1[n] = bsm1[n] + (cy >> 1);
   11.78        bsm1[n]-= cy & 1;
   11.79      }
    12.1 --- a/mpn/generic/toom44_mul.c	Sat Oct 03 23:26:01 2009 +0200
    12.2 +++ b/mpn/generic/toom44_mul.c	Sun Oct 04 00:01:37 2009 +0200
    12.3 @@ -214,15 +214,15 @@
    12.4  #endif
    12.5    cy = mpn_lshift (tp, a1, n, 2);			/*  4a1             */
    12.6    tp[n] = cy + mpn_add (tp, tp, n, a3, s);		/*  4a1 +  a3       */
    12.7 -#if HAVE_NATIVE_mpn_addsub_n
    12.8 +#if HAVE_NATIVE_mpn_add_n_sub_n
    12.9    if (mpn_cmp (apx, tp, n + 1) < 0)
   12.10      {
   12.11 -      mpn_addsub_n (apx, amx, tp, apx, n + 1);
   12.12 +      mpn_add_n_sub_n (apx, amx, tp, apx, n + 1);
   12.13        flags |= toom7_w1_neg;
   12.14      }
   12.15    else
   12.16      {
   12.17 -      mpn_addsub_n (apx, amx, apx, tp, n + 1);
   12.18 +      mpn_add_n_sub_n (apx, amx, apx, tp, n + 1);
   12.19      }
   12.20  #else
   12.21    if (mpn_cmp (apx, tp, n + 1) < 0)
   12.22 @@ -250,15 +250,15 @@
   12.23  #endif
   12.24    cy = mpn_lshift (tp, b1, n, 2);			/*  4a1             */
   12.25    tp[n] = cy + mpn_add (tp, tp, n, b3, t);		/*  4a1 +  b3       */
   12.26 -#if HAVE_NATIVE_mpn_addsub_n
   12.27 +#if HAVE_NATIVE_mpn_add_n_sub_n
   12.28    if (mpn_cmp (bpx, tp, n + 1) < 0)
   12.29      {
   12.30 -      mpn_addsub_n (bpx, bmx, tp, bpx, n + 1);
   12.31 +      mpn_add_n_sub_n (bpx, bmx, tp, bpx, n + 1);
   12.32        flags ^= toom7_w1_neg;
   12.33      }
   12.34    else
   12.35      {
   12.36 -      mpn_addsub_n (bpx, bmx, bpx, tp, n + 1);
   12.37 +      mpn_add_n_sub_n (bpx, bmx, bpx, tp, n + 1);
   12.38      }
   12.39  #else
   12.40    if (mpn_cmp (bpx, tp, n + 1) < 0)
    13.1 --- a/mpn/generic/toom4_sqr.c	Sat Oct 03 23:26:01 2009 +0200
    13.2 +++ b/mpn/generic/toom4_sqr.c	Sun Oct 04 00:01:37 2009 +0200
    13.3 @@ -147,11 +147,11 @@
    13.4  #endif
    13.5    cy = mpn_lshift (tp, a1, n, 2);			/*  4a1             */
    13.6    tp[n] = cy + mpn_add (tp, tp, n, a3, s);		/*  4a1 +  a3       */
    13.7 -#if HAVE_NATIVE_mpn_addsub_n
    13.8 +#if HAVE_NATIVE_mpn_add_n_sub_n
    13.9    if (mpn_cmp (apx, tp, n + 1) < 0)
   13.10 -    mpn_addsub_n (apx, amx, tp, apx, n + 1);
   13.11 +    mpn_add_n_sub_n (apx, amx, tp, apx, n + 1);
   13.12    else
   13.13 -    mpn_addsub_n (apx, amx, apx, tp, n + 1);
   13.14 +    mpn_add_n_sub_n (apx, amx, apx, tp, n + 1);
   13.15  #else
   13.16    if (mpn_cmp (apx, tp, n + 1) < 0)
   13.17      mpn_sub_n (amx, tp, apx, n + 1);
    14.1 --- a/mpn/generic/toom52_mul.c	Sat Oct 03 23:26:01 2009 +0200
    14.2 +++ b/mpn/generic/toom52_mul.c	Sun Oct 04 00:01:37 2009 +0200
    14.3 @@ -130,15 +130,15 @@
    14.4    /* Compute bs1 and bsm1.  */
    14.5    if (t == n)
    14.6      {
    14.7 -#if HAVE_NATIVE_mpn_addsub_n
    14.8 +#if HAVE_NATIVE_mpn_add_n_sub_n
    14.9        if (mpn_cmp (b0, b1, n) < 0)
   14.10  	{
   14.11 -	  cy = mpn_addsub_n (bs1, bsm1, b1, b0, n);
   14.12 +	  cy = mpn_add_n_sub_n (bs1, bsm1, b1, b0, n);
   14.13  	  flags ^= toom6_vm1_neg;
   14.14  	}
   14.15        else
   14.16  	{
   14.17 -	  cy = mpn_addsub_n (bs1, bsm1, b0, b1, n);
   14.18 +	  cy = mpn_add_n_sub_n (bs1, bsm1, b0, b1, n);
   14.19  	}
   14.20        bs1[n] = cy >> 1;
   14.21  #else
   14.22 @@ -218,15 +218,15 @@
   14.23    cy += mpn_add_n (a0a2, a0a2, asm2, s);		/* 16a4     +4a2      + a0 */
   14.24    MPN_INCR_U(a0a2 + s, n - s + 1, cy);
   14.25  
   14.26 -#if HAVE_NATIVE_mpn_addsub_n
   14.27 +#if HAVE_NATIVE_mpn_add_n_sub_n
   14.28    if (mpn_cmp (a0a2, a1a3, n+1) < 0)
   14.29      {
   14.30 -      mpn_addsub_n (as2, asm2, a1a3, a0a2, n+1);
   14.31 +      mpn_add_n_sub_n (as2, asm2, a1a3, a0a2, n+1);
   14.32        flags ^= toom6_vm1_neg;
   14.33      }
   14.34    else
   14.35      {
   14.36 -      mpn_addsub_n (as2, asm2, a0a2, a1a3, n+1);
   14.37 +      mpn_add_n_sub_n (as2, asm2, a0a2, a1a3, n+1);
   14.38      }
   14.39  #else
   14.40    mpn_add_n (as2, a0a2, a1a3, n+1);
   14.41 @@ -245,15 +245,15 @@
   14.42    cy = mpn_add (a0a2, a2, n, a4, s);
   14.43    a0a2[n] = cy + mpn_add_n (a0a2, a0, a0a2, n);
   14.44    asm1[n] = mpn_add_n (asm1, a1, a3, n);
   14.45 -#if HAVE_NATIVE_mpn_addsub_n
   14.46 +#if HAVE_NATIVE_mpn_add_n_sub_n
   14.47    if (mpn_cmp (a0a2, asm1, n+1) < 0)
   14.48      {
   14.49 -      cy = mpn_addsub_n (as1, asm1, asm1, a0a2, n+1);
   14.50 +      cy = mpn_add_n_sub_n (as1, asm1, asm1, a0a2, n+1);
   14.51        flags ^= toom6_vm1_neg;
   14.52      }
   14.53    else
   14.54      {
   14.55 -      cy = mpn_addsub_n (as1, asm1, a0a2, asm1, n+1);
   14.56 +      cy = mpn_add_n_sub_n (as1, asm1, a0a2, asm1, n+1);
   14.57      }
   14.58  #else
   14.59    mpn_add_n (as1, a0a2, asm1, n+1);
    15.1 --- a/mpn/generic/toom53_mul.c	Sat Oct 03 23:26:01 2009 +0200
    15.2 +++ b/mpn/generic/toom53_mul.c	Sun Oct 04 00:01:37 2009 +0200
    15.3 @@ -101,15 +101,15 @@
    15.4    gp[n]  = mpn_add_n (gp, a0, a2, n);
    15.5    gp[n] += mpn_add   (gp, gp, n, a4, s);
    15.6    hp[n]  = mpn_add_n (hp, a1, a3, n);
    15.7 -#if HAVE_NATIVE_mpn_addsub_n
    15.8 +#if HAVE_NATIVE_mpn_add_n_sub_n
    15.9    if (mpn_cmp (gp, hp, n + 1) < 0)
   15.10      {
   15.11 -      mpn_addsub_n (as1, asm1, hp, gp, n + 1);
   15.12 +      mpn_add_n_sub_n (as1, asm1, hp, gp, n + 1);
   15.13        vm1_neg = 1;
   15.14      }
   15.15    else
   15.16      {
   15.17 -      mpn_addsub_n (as1, asm1, gp, hp, n + 1);
   15.18 +      mpn_add_n_sub_n (as1, asm1, gp, hp, n + 1);
   15.19        vm1_neg = 0;
   15.20      }
   15.21  #else
   15.22 @@ -166,15 +166,15 @@
   15.23    cy += mpn_add_n (hp, ash, hp, n);			/*  8a1 + 2a3       */
   15.24    hp[n] = cy;
   15.25  #endif
   15.26 -#if HAVE_NATIVE_mpn_addsub_n
   15.27 +#if HAVE_NATIVE_mpn_add_n_sub_n
   15.28    if (mpn_cmp (gp, hp, n + 1) < 0)
   15.29      {
   15.30 -      mpn_addsub_n (ash, asmh, hp, gp, n + 1);
   15.31 +      mpn_add_n_sub_n (ash, asmh, hp, gp, n + 1);
   15.32        vmh_neg = 1;
   15.33      }
   15.34    else
   15.35      {
   15.36 -      mpn_addsub_n (ash, asmh, gp, hp, n + 1);
   15.37 +      mpn_add_n_sub_n (ash, asmh, gp, hp, n + 1);
   15.38        vmh_neg = 0;
   15.39      }
   15.40  #else
   15.41 @@ -193,16 +193,16 @@
   15.42  
   15.43    /* Compute bs1 and bsm1.  */
   15.44    bs1[n] = mpn_add (bs1, b0, n, b2, t);		/* b0 + b2 */
   15.45 -#if HAVE_NATIVE_mpn_addsub_n
   15.46 +#if HAVE_NATIVE_mpn_add_n_sub_n
   15.47    if (bs1[n] == 0 && mpn_cmp (bs1, b1, n) < 0)
   15.48      {
   15.49 -      bs1[n] = mpn_addsub_n (bs1, bsm1, b1, bs1, n) >> 1;
   15.50 +      bs1[n] = mpn_add_n_sub_n (bs1, bsm1, b1, bs1, n) >> 1;
   15.51        bsm1[n] = 0;
   15.52        vm1_neg ^= 1;
   15.53      }
   15.54    else
   15.55      {
   15.56 -      cy = mpn_addsub_n (bs1, bsm1, bs1, b1, n);
   15.57 +      cy = mpn_add_n_sub_n (bs1, bsm1, bs1, b1, n);
   15.58        bsm1[n] = bs1[n] - (cy & 1);
   15.59        bs1[n] += (cy >> 1);
   15.60      }
   15.61 @@ -241,14 +241,14 @@
   15.62    cy = mpn_lshift (gp, b0, n, 2);			/* 4b0             */
   15.63    gp[n] = cy + mpn_add (gp, gp, n, b2, t);		/* 4b0 +        b2 */
   15.64  #endif
   15.65 -#if HAVE_NATIVE_mpn_addsub_n
   15.66 +#if HAVE_NATIVE_mpn_add_n_sub_n
   15.67    if (mpn_cmp (gp, hp, n + 1) < 0)
   15.68      {
   15.69 -      mpn_addsub_n (bsh, bsmh, hp, gp, n + 1);
   15.70 +      mpn_add_n_sub_n (bsh, bsmh, hp, gp, n + 1);
   15.71        vmh_neg^= 1;
   15.72      }
   15.73    else
   15.74 -    mpn_addsub_n (bsh, bsmh, gp, hp, n + 1);
   15.75 +    mpn_add_n_sub_n (bsh, bsmh, gp, hp, n + 1);
   15.76  #else
   15.77    mpn_add_n (bsh, gp, hp, n + 1);			/* 4b0 + 2b1 +  b2 */
   15.78    if (mpn_cmp (gp, hp, n + 1) < 0)
    16.1 --- a/mpn/generic/toom62_mul.c	Sat Oct 03 23:26:01 2009 +0200
    16.2 +++ b/mpn/generic/toom62_mul.c	Sun Oct 04 00:01:37 2009 +0200
    16.3 @@ -102,15 +102,15 @@
    16.4    a0_a2[n] += mpn_add_n (a0_a2, a0_a2, a4, n);
    16.5    a1_a3[n]  = mpn_add_n (a1_a3, a1, a3, n);
    16.6    a1_a3[n] += mpn_add (a1_a3, a1_a3, n, a5, s);
    16.7 -#if HAVE_NATIVE_mpn_addsub_n
    16.8 +#if HAVE_NATIVE_mpn_add_n_sub_n
    16.9    if (mpn_cmp (a0_a2, a1_a3, n + 1) < 0)
   16.10      {
   16.11 -      mpn_addsub_n (as1, asm1, a1_a3, a0_a2, n + 1);
   16.12 +      mpn_add_n_sub_n (as1, asm1, a1_a3, a0_a2, n + 1);
   16.13        vm1_neg = 1;
   16.14      }
   16.15    else
   16.16      {
   16.17 -      mpn_addsub_n (as1, asm1, a0_a2, a1_a3, n + 1);
   16.18 +      mpn_add_n_sub_n (as1, asm1, a0_a2, a1_a3, n + 1);
   16.19        vm1_neg = 0;
   16.20      }
   16.21  #else
   16.22 @@ -174,15 +174,15 @@
   16.23    cy += mpn_add (a1_a3, a1_a3, n, a5, s);		/* 16a1 + 4a3 + a5  */
   16.24    a1_a3[n] = cy;
   16.25  #endif
   16.26 -#if HAVE_NATIVE_mpn_addsub_n
   16.27 +#if HAVE_NATIVE_mpn_add_n_sub_n
   16.28    if (mpn_cmp (a0_a2, a1_a3, n + 1) < 0)
   16.29      {
   16.30 -      mpn_addsub_n (ash, asmh, a1_a3, a0_a2, n + 1);
   16.31 +      mpn_add_n_sub_n (ash, asmh, a1_a3, a0_a2, n + 1);
   16.32        vmh_neg = 1;
   16.33      }
   16.34    else
   16.35      {
   16.36 -      mpn_addsub_n (ash, asmh, a0_a2, a1_a3, n + 1);
   16.37 +      mpn_add_n_sub_n (ash, asmh, a0_a2, a1_a3, n + 1);
   16.38        vmh_neg = 0;
   16.39      }
   16.40  #else
   16.41 @@ -202,15 +202,15 @@
   16.42    /* Compute bs1 and bsm1.  */
   16.43    if (t == n)
   16.44      {
   16.45 -#if HAVE_NATIVE_mpn_addsub_n
   16.46 +#if HAVE_NATIVE_mpn_add_n_sub_n
   16.47        if (mpn_cmp (b0, b1, n) < 0)
   16.48  	{
   16.49 -	  cy = mpn_addsub_n (bs1, bsm1, b1, b0, n);
   16.50 +	  cy = mpn_add_n_sub_n (bs1, bsm1, b1, b0, n);
   16.51  	  bsm_neg = 1;
   16.52  	}
   16.53        else
   16.54  	{
   16.55 -	  cy = mpn_addsub_n (bs1, bsm1, b0, b1, n);
   16.56 +	  cy = mpn_add_n_sub_n (bs1, bsm1, b0, b1, n);
   16.57  	  bsm_neg = 0;
   16.58  	}
   16.59        bs1[n] = cy >> 1;
    17.1 --- a/mpn/generic/toom_eval_dgr3_pm1.c	Sat Oct 03 23:26:01 2009 +0200
    17.2 +++ b/mpn/generic/toom_eval_dgr3_pm1.c	Sun Oct 04 00:01:37 2009 +0200
    17.3 @@ -40,11 +40,11 @@
    17.4    tp[n] = mpn_add (tp, xp + n, n, xp + 3*n, x3n);
    17.5  
    17.6    neg = (mpn_cmp (xp1, tp, n + 1) < 0);
    17.7 -#if HAVE_NATIVE_mpn_addsub_n
    17.8 +#if HAVE_NATIVE_mpn_add_n_sub_n
    17.9    if (neg)
   17.10 -    mpn_addsub_n (xp1, xm1, tp, xp1, n + 1);
   17.11 +    mpn_add_n_sub_n (xp1, xm1, tp, xp1, n + 1);
   17.12    else
   17.13 -    mpn_addsub_n (xp1, xm1, xp1, tp, n + 1);
   17.14 +    mpn_add_n_sub_n (xp1, xm1, xp1, tp, n + 1);
   17.15  #else
   17.16    if (neg)
   17.17      mpn_sub_n (xm1, tp, xp1, n + 1);
    18.1 --- a/mpn/x86_64/redc_1.asm	Sat Oct 03 23:26:01 2009 +0200
    18.2 +++ b/mpn/x86_64/redc_1.asm	Sun Oct 04 00:01:37 2009 +0200
    18.3 @@ -33,7 +33,7 @@
    18.4  C    The code for 1, 2, 3, 4 should perhaps be completely register based.
    18.5  C  * Perhaps align outer loops.
    18.6  C  * The sub_n at the end leaks side-channel data.  How do we fix that?
    18.7 -C  * Write mpn_addsub_n computing R = A + B - C.  It should run at 2 c/l.
    18.8 +C  * Write mpn_add_n_sub_n computing R = A + B - C.  It should run at 2 c/l.
    18.9  C  * We could software pipeline the IMUL stuff, by putting it before the
   18.10  C    outer loops and before the end of the outer loops.  The last outer
   18.11  C    loop iteration would then compute an unneeded product, but it is at
    19.1 --- a/mpz/fib_ui.c	Sat Oct 03 23:26:01 2009 +0200
    19.2 +++ b/mpz/fib_ui.c	Sun Oct 04 00:01:37 2009 +0200
    19.3 @@ -78,10 +78,10 @@
    19.4        /* F[2k+1] = (2F[k]+F[k-1])*(2F[k]-F[k-1]) + 2*(-1)^k  */
    19.5        mp_size_t  xsize, ysize;
    19.6  
    19.7 -#if HAVE_NATIVE_mpn_addsub_n
    19.8 +#if HAVE_NATIVE_mpn_add_n_sub_n
    19.9        xp[size] = mpn_lshift (xp, xp, size, 1);
   19.10        yp[size] = 0;
   19.11 -      ASSERT_NOCARRY (mpn_addsub_n (xp, yp, xp, yp, size+1));
   19.12 +      ASSERT_NOCARRY (mpn_add_n_sub_n (xp, yp, xp, yp, size+1));
   19.13        xsize = size + (xp[size] != 0);
   19.14        ysize = size + (yp[size] != 0);
   19.15  #else
    20.1 --- a/tests/devel/Makefile.am	Sat Oct 03 23:26:01 2009 +0200
    20.2 +++ b/tests/devel/Makefile.am	Sun Oct 04 00:01:37 2009 +0200
    20.3 @@ -21,7 +21,7 @@
    20.4  INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/tests
    20.5  LDADD = $(top_builddir)/tests/libtests.la $(top_builddir)/libgmp.la
    20.6  
    20.7 -# addsub_n addsub_n_2 not yet built since mpn_addsub_n doesn't yet exist
    20.8 +# add_n_sub_n add_n_sub_n_2 not yet built since mpn_add_n_sub_n doesn't yet exist
    20.9  #
   20.10  EXTRA_PROGRAMS = \
   20.11    aors_n anymul_1 copy divmod_1 divrem shift logops_n tst-addsub try
    21.1 --- a/tests/devel/addsub_n.c	Sat Oct 03 23:26:01 2009 +0200
    21.2 +++ b/tests/devel/addsub_n.c	Sun Oct 04 00:01:37 2009 +0200
    21.3 @@ -122,9 +122,9 @@
    21.4  
    21.5        t0 = cputime();
    21.6        for (i = 0; i < TIMES; i++)
    21.7 -	mpn_addsub_n (d1x+1, d2x+1, s1, s2, size);
    21.8 +	mpn_add_n_sub_n (d1x+1, d2x+1, s1, s2, size);
    21.9        t = cputime() - t0;
   21.10 -      printf ("   mpn_addsub_n:   %ldms (%.3f cycles/limb)\n",
   21.11 +      printf ("   mpn_add_n_sub_n:   %ldms (%.3f cycles/limb)\n",
   21.12  	      t, ((double) t * CLOCK) / (TIMES * size * 1000.0));
   21.13  #endif
   21.14  
   21.15 @@ -146,8 +146,8 @@
   21.16  	  d2y[i+1] = 0xdeaf;
   21.17  	}
   21.18  
   21.19 -      cyx = refmpn_addsub_n (d1x+1, d2x+1, s1, s2, size);
   21.20 -      cyy = mpn_addsub_n (d1y+1, d2y+1, s1, s2, size);
   21.21 +      cyx = refmpn_add_n_sub_n (d1x+1, d2x+1, s1, s2, size);
   21.22 +      cyy = mpn_add_n_sub_n (d1y+1, d2y+1, s1, s2, size);
   21.23  #ifdef PRINT
   21.24        printf ("%d ", cyx); mpn_print (d1x+1, size);
   21.25        printf ("%d ", cyx); mpn_print (d2x+1, size);
    22.1 --- a/tests/devel/addsub_n_2.c	Sat Oct 03 23:26:01 2009 +0200
    22.2 +++ b/tests/devel/addsub_n_2.c	Sun Oct 04 00:01:37 2009 +0200
    22.3 @@ -151,8 +151,8 @@
    22.4  	  r2p[-1] = 0x87654321;
    22.5  	  r2p[n] = 0x12345678;
    22.6  
    22.7 -	  refcy = refmpn_addsub_n (ref1p, ref2p, s1p, s2p, n);
    22.8 -	  cy = mpn_addsub_n (r1p, r2p, s1p, s2p, n);
    22.9 +	  refcy = refmpn_add_n_sub_n (ref1p, ref2p, s1p, s2p, n);
   22.10 +	  cy = mpn_add_n_sub_n (r1p, r2p, s1p, s2p, n);
   22.11  
   22.12  	  if (refcy != cy
   22.13  	      || mpn_cmp (ref1p, r1p, n) != 0
    23.1 --- a/tests/devel/try.c	Sat Oct 03 23:26:01 2009 +0200
    23.2 +++ b/tests/devel/try.c	Sun Oct 04 00:01:37 2009 +0200
    23.3 @@ -847,12 +847,12 @@
    23.4    p->dst[1] = 1;
    23.5    p->src[0] = 1;
    23.6    p->src[1] = 1;
    23.7 -  REFERENCE (refmpn_addsub_n);
    23.8 +  REFERENCE (refmpn_add_n_sub_n);
    23.9  
   23.10    p = &param[TYPE_ADDSUB_NC];
   23.11    COPY (TYPE_ADDSUB_N);
   23.12    p->carry = CARRY_4;
   23.13 -  REFERENCE (refmpn_addsub_nc);
   23.14 +  REFERENCE (refmpn_add_n_sub_nc);
   23.15  
   23.16  
   23.17    p = &param[TYPE_COPY];
   23.18 @@ -1329,11 +1329,11 @@
   23.19    { TRY(mpn_sub_nc),    TYPE_SUB_NC },
   23.20  #endif
   23.21  
   23.22 -#if HAVE_NATIVE_mpn_addsub_n
   23.23 -  { TRY(mpn_addsub_n),  TYPE_ADDSUB_N  },
   23.24 +#if HAVE_NATIVE_mpn_add_n_sub_n
   23.25 +  { TRY(mpn_add_n_sub_n),  TYPE_ADDSUB_N  },
   23.26  #endif
   23.27 -#if HAVE_NATIVE_mpn_addsub_nc
   23.28 -  { TRY(mpn_addsub_nc), TYPE_ADDSUB_NC },
   23.29 +#if HAVE_NATIVE_mpn_add_n_sub_nc
   23.30 +  { TRY(mpn_add_n_sub_nc), TYPE_ADDSUB_NC },
   23.31  #endif
   23.32  
   23.33    { TRY(mpn_addmul_1),  TYPE_ADDMUL_1  },
    24.1 --- a/tests/refmpn.c	Sat Oct 03 23:26:01 2009 +0200
    24.2 +++ b/tests/refmpn.c	Sun Oct 04 00:01:37 2009 +0200
    24.3 @@ -953,7 +953,7 @@
    24.4  }
    24.5  
    24.6  mp_limb_t
    24.7 -refmpn_addsub_nc (mp_ptr r1p, mp_ptr r2p,
    24.8 +refmpn_add_n_sub_nc (mp_ptr r1p, mp_ptr r2p,
    24.9  		  mp_srcptr s1p, mp_srcptr s2p, mp_size_t size,
   24.10  		  mp_limb_t carry)
   24.11  {
   24.12 @@ -978,10 +978,10 @@
   24.13  }
   24.14  
   24.15  mp_limb_t
   24.16 -refmpn_addsub_n (mp_ptr r1p, mp_ptr r2p,
   24.17 +refmpn_add_n_sub_n (mp_ptr r1p, mp_ptr r2p,
   24.18  		 mp_srcptr s1p, mp_srcptr s2p, mp_size_t size)
   24.19  {
   24.20 -  return refmpn_addsub_nc (r1p, r2p, s1p, s2p, size, CNST_LIMB(0));
   24.21 +  return refmpn_add_n_sub_nc (r1p, r2p, s1p, s2p, size, CNST_LIMB(0));
   24.22  }
   24.23  
   24.24  
    25.1 --- a/tests/tests.h	Sat Oct 03 23:26:01 2009 +0200
    25.2 +++ b/tests/tests.h	Sun Oct 04 00:01:37 2009 +0200
    25.3 @@ -201,10 +201,10 @@
    25.4  mp_limb_t refmpn_addmul_8 __GMP_PROTO ((mp_ptr dst, mp_srcptr src,
    25.5                                          mp_size_t size, mp_srcptr mult));
    25.6  
    25.7 -mp_limb_t refmpn_addsub_n __GMP_PROTO ((mp_ptr r1p, mp_ptr r2p,
    25.8 +mp_limb_t refmpn_add_n_sub_n __GMP_PROTO ((mp_ptr r1p, mp_ptr r2p,
    25.9                                     mp_srcptr s1p, mp_srcptr s2p,
   25.10                                     mp_size_t size));
   25.11 -mp_limb_t refmpn_addsub_nc __GMP_PROTO ((mp_ptr r1p, mp_ptr r2p,
   25.12 +mp_limb_t refmpn_add_n_sub_nc __GMP_PROTO ((mp_ptr r1p, mp_ptr r2p,
   25.13                                      mp_srcptr s1p, mp_srcptr s2p,
   25.14                                      mp_size_t size, mp_limb_t carry));
   25.15  
    26.1 --- a/tune/common.c	Sat Oct 03 23:26:01 2009 +0200
    26.2 +++ b/tune/common.c	Sun Oct 04 00:01:37 2009 +0200
    26.3 @@ -797,11 +797,11 @@
    26.4  SPEED_ROUTINE_MPN_BINARY_N (mpn_sub_n);
    26.5  }
    26.6  
    26.7 -#if HAVE_NATIVE_mpn_addsub_n
    26.8 +#if HAVE_NATIVE_mpn_add_n_sub_n
    26.9  double
   26.10 -speed_mpn_addsub_n (struct speed_params *s)
   26.11 +speed_mpn_add_n_sub_n (struct speed_params *s)
   26.12  {
   26.13 -  SPEED_ROUTINE_MPN_ADDSUB_N_CALL (mpn_addsub_n (ap, sp, s->xp, s->yp, s->size));
   26.14 +  SPEED_ROUTINE_MPN_ADDSUB_N_CALL (mpn_add_n_sub_n (ap, sp, s->xp, s->yp, s->size));
   26.15  }
   26.16  #endif
   26.17  
    27.1 --- a/tune/many.pl	Sat Oct 03 23:26:01 2009 +0200
    27.2 +++ b/tune/many.pl	Sun Oct 04 00:01:37 2009 +0200
    27.3 @@ -369,7 +369,7 @@
    27.4       },
    27.5  
    27.6       {
    27.7 -       'regexp'=> 'addsub_n',
    27.8 +       'regexp'=> 'add_n_sub_n',
    27.9         'ret'   => 'mp_limb_t',
   27.10         'args'  => 'mp_ptr sum, mp_ptr diff, mp_srcptr xp, mp_srcptr yp, mp_size_t size',
   27.11         'speed_flags'=> 'FLAG_R_OPTIONAL',
    28.1 --- a/tune/speed.c	Sat Oct 03 23:26:01 2009 +0200
    28.2 +++ b/tune/speed.c	Sun Oct 04 00:01:37 2009 +0200
    28.3 @@ -152,8 +152,8 @@
    28.4    { "mpn_add_n",         speed_mpn_add_n,     FLAG_R_OPTIONAL },
    28.5    { "mpn_sub_n",         speed_mpn_sub_n,     FLAG_R_OPTIONAL },
    28.6  
    28.7 -#if HAVE_NATIVE_mpn_addsub_n
    28.8 -  { "mpn_addsub_n",      speed_mpn_addsub_n,     FLAG_R_OPTIONAL },
    28.9 +#if HAVE_NATIVE_mpn_add_n_sub_n
   28.10 +  { "mpn_add_n_sub_n",      speed_mpn_add_n_sub_n,     FLAG_R_OPTIONAL },
   28.11  #endif
   28.12  
   28.13    { "mpn_addmul_1",      speed_mpn_addmul_1,  FLAG_R },
    29.1 --- a/tune/speed.h	Sat Oct 03 23:26:01 2009 +0200
    29.2 +++ b/tune/speed.h	Sun Oct 04 00:01:37 2009 +0200
    29.3 @@ -146,7 +146,7 @@
    29.4  
    29.5  double speed_mpn_add_n __GMP_PROTO ((struct speed_params *s));
    29.6  double speed_mpn_addlsh1_n __GMP_PROTO ((struct speed_params *s));
    29.7 -double speed_mpn_addsub_n __GMP_PROTO ((struct speed_params *s));
    29.8 +double speed_mpn_add_n_sub_n __GMP_PROTO ((struct speed_params *s));
    29.9  double speed_mpn_and_n __GMP_PROTO ((struct speed_params *s));
   29.10  double speed_mpn_andn_n __GMP_PROTO ((struct speed_params *s));
   29.11  double speed_mpn_addmul_1 __GMP_PROTO ((struct speed_params *s));