mpn_cnd_add_n

Niels Möller nisse at lysator.liu.se
Tue Mar 12 13:17:07 CET 2013


nisse at lysator.liu.se (Niels Möller) writes:

> Here's a patch that reorders the arguments for mpn_addcnd_n and
> mpn_subcnd_n (I think it's best to keep this change separate from the
> renaming, since the potential problems are quite different).

This seems to work now, after additional fixes for powerpc64 and x86_64
w*ndows. Here's the next patch, doing the rename of functions and files.
I generated it with hg diff --git, to get concise diffs for the renamed
files (to apply, I think one need a recent patch program, or use git
apply, where the latter apparently doesn't require any git repo).

I plan to check this in fairly soon.

Regards,
/Niels

diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,32 @@
+2013-03-12  Niels Möller  <nisse at lysator.liu.se>
+
+	New names mpn_cnd_add_n and mpn_cnd_sub_n.
+	* mpn/generic/cnd_add_n.c (mpn_cnd_add_n): Renamed file and
+	function, from addcnd.c:mpn_addcnd_n.
+	* mpn/generic/cnd_sub_n.c (mpn_cnd_sub_n): Renamed, from
+	subcnd.c:mpn_subcnd_n.
+	* mpn/arm/cnd_aors_n.asm: Renamed file, from aorscnd.asm, and
+	renamed functions.
+	* mpn/x86_64/cnd_aors_n.asm: Analogous renaming.
+	* mpn/powerpc64/mode64/cnd_aors_n.asm: Analogous renaming.
+	* gmp-impl.h (mpn_cnd_add_n, mpn_cnd_add_n): Updated prototypes
+	with new names.
+	* configure.ac: Updated for new names.
+	* tests/refmpn.c (refmpn_cnd_add_n): Renamed, from refmpn_addcnd_n.
+	(refmpn_cnd_sub_n): Renamed, from refmpn_subcnd_n.
+	* tests/tests.h (refmpn_cnd_add_n, refmpn_cnd_sub_n): Updated
+	prototypes with new names.
+	* tune/common.c (speed_mpn_cnd_add_n): Renamed, from
+	speed_mpn_addcnd_n, call mpn_cnd_add_n.
+	(speed_mpn_cnd_sub_n): Renamed, from speed_mpn_subcnd_n, call
+	mpn_cnd_sub_n.
+	* tune/speed.h (speed_mpn_cnd_add_n, speed_mpn_cnd_sub_n): Updated
+	prototypes with new names.
+	* tune/speed.c (routine): Updated list with new names.
+	* tests/devel/try.c: Updated for new mpn_cnd_* names.
+	* mpn/generic/sbpi1_div_sec.c: Likewise.
+	* mpn/generic/powm_sec.c: Likewise.
+
 2013-03-12  Torbjorn Granlund  <tege at gmplib.org>
 
 	* configure.ac: Add "missing" to extra_functions for coreibwl.
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -2718,7 +2718,7 @@
   add_n_sub_n addaddmul_1msb0"
 
 gmp_mpn_functions="$extra_functions					   \
-  add add_1 add_n sub sub_1 sub_n addcnd_n subcnd_n neg com		   \
+  add add_1 add_n sub sub_1 sub_n cnd_add_n cnd_sub_n neg com		   \
   mul_1 addmul_1 submul_1						   \
   add_err1_n add_err2_n add_err3_n sub_err1_n sub_err2_n sub_err3_n	   \
   lshift rshift dive_1 diveby3 divis divrem divrem_1 divrem_2		   \
@@ -2775,7 +2775,7 @@
 		     tmp_mulfunc="aors_err2_n" ;;
   add_err3_n|sub_err3_n)
 		     tmp_mulfunc="aors_err3_n" ;;
-  addcnd_n|subcnd_n) tmp_mulfunc="aorscnd_n"   ;;
+  cnd_add_n|cnd_sub_n) tmp_mulfunc="cnd_aors_n"   ;;
   addmul_1|submul_1) tmp_mulfunc="aorsmul_1" ;;
   mul_2|addmul_2)    tmp_mulfunc="aormul_2" ;;
   popcount|hamdist)  tmp_mulfunc="popham"    ;;
@@ -3268,7 +3268,6 @@
 #undef HAVE_NATIVE_mpn_add_n_sub_n
 #undef HAVE_NATIVE_mpn_add_nc
 #undef HAVE_NATIVE_mpn_addaddmul_1msb0
-#undef HAVE_NATIVE_mpn_addcnd_n
 #undef HAVE_NATIVE_mpn_addlsh1_n
 #undef HAVE_NATIVE_mpn_addlsh2_n
 #undef HAVE_NATIVE_mpn_addlsh_n
@@ -3301,6 +3300,8 @@
 #undef HAVE_NATIVE_mpn_bdiv_dbm1c
 #undef HAVE_NATIVE_mpn_bdiv_q_1
 #undef HAVE_NATIVE_mpn_pi1_bdiv_q_1
+#undef HAVE_NATIVE_mpn_cnd_add_n
+#undef HAVE_NATIVE_mpn_cnd_sub_n
 #undef HAVE_NATIVE_mpn_com
 #undef HAVE_NATIVE_mpn_copyd
 #undef HAVE_NATIVE_mpn_copyi
@@ -3357,7 +3358,6 @@
 #undef HAVE_NATIVE_mpn_sqr_diag_addlsh1
 #undef HAVE_NATIVE_mpn_sub_n
 #undef HAVE_NATIVE_mpn_sub_nc
-#undef HAVE_NATIVE_mpn_subcnd_n
 #undef HAVE_NATIVE_mpn_sublsh1_n
 #undef HAVE_NATIVE_mpn_sublsh2_n
 #undef HAVE_NATIVE_mpn_sublsh_n
diff --git a/gmp-impl.h b/gmp-impl.h
--- a/gmp-impl.h
+++ b/gmp-impl.h
@@ -1555,10 +1555,10 @@
 __GMP_DECLSPEC mp_size_t mpn_powm_sec_itch (mp_size_t, mp_size_t, mp_size_t);
 #define   mpn_tabselect __MPN(tabselect)
 __GMP_DECLSPEC void      mpn_tabselect (volatile mp_limb_t *, volatile mp_limb_t *, mp_size_t, mp_size_t, mp_size_t);
-#define   mpn_addcnd_n __MPN(addcnd_n)
-__GMP_DECLSPEC mp_limb_t mpn_addcnd_n (mp_limb_t, mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
-#define   mpn_subcnd_n __MPN(subcnd_n)
-__GMP_DECLSPEC mp_limb_t mpn_subcnd_n (mp_limb_t, mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
+#define   mpn_cnd_add_n __MPN(cnd_add_n)
+__GMP_DECLSPEC mp_limb_t mpn_cnd_add_n (mp_limb_t, mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
+#define   mpn_cnd_sub_n __MPN(cnd_sub_n)
+__GMP_DECLSPEC mp_limb_t mpn_cnd_sub_n (mp_limb_t, mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
 
 #define mpn_sb_div_qr_sec __MPN(sb_div_qr_sec)
 __GMP_DECLSPEC void mpn_sb_div_qr_sec (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr);
diff --git a/mpn/arm/aorscnd_n.asm b/mpn/arm/cnd_aors_n.asm
rename from mpn/arm/aorscnd_n.asm
rename to mpn/arm/cnd_aors_n.asm
--- a/mpn/arm/aorscnd_n.asm
+++ b/mpn/arm/cnd_aors_n.asm
@@ -1,4 +1,4 @@
-dnl  ARM mpn_addcnd_n, mpn_subcnd_n
+dnl  ARM mpn_cnd_add_n, mpn_cnd_sub_n
 
 dnl  Copyright 2012 Free Software Foundation, Inc.
 
@@ -34,21 +34,21 @@
 define(`n',	`r12')
 
 
-ifdef(`OPERATION_addcnd_n', `
+ifdef(`OPERATION_cnd_add_n', `
 	define(`ADDSUB',      adds)
 	define(`ADDSUBC',      adcs)
 	define(`INITCY',      `cmn	r0, #0')
 	define(`RETVAL',      `adc	r0, n, #0')
-	define(func,	      mpn_addcnd_n)')
-ifdef(`OPERATION_subcnd_n', `
+	define(func,	      mpn_cnd_add_n)')
+ifdef(`OPERATION_cnd_sub_n', `
 	define(`ADDSUB',      subs)
 	define(`ADDSUBC',      sbcs)
 	define(`INITCY',      `cmp	r0, #0')
 	define(`RETVAL',      `adc	r0, n, #0
 			      rsb	r0, r0, #1')
-	define(func,	      mpn_subcnd_n)')
+	define(func,	      mpn_cnd_sub_n)')
 
-MULFUNC_PROLOGUE(mpn_addcnd_n mpn_subcnd_n)
+MULFUNC_PROLOGUE(mpn_cnd_add_n mpn_cnd_sub_n)
 
 ASM_START()
 PROLOGUE(func)
diff --git a/mpn/asm-defs.m4 b/mpn/asm-defs.m4
--- a/mpn/asm-defs.m4
+++ b/mpn/asm-defs.m4
@@ -1323,7 +1323,6 @@
 define_mpn(add_err3_n)
 define_mpn(add_n)
 define_mpn(add_nc)
-define_mpn(addcnd_n)
 define_mpn(addlsh1_n)
 define_mpn(addlsh1_nc)
 define_mpn(addlsh2_n)
@@ -1361,6 +1360,8 @@
 define_mpn(pi1_bdiv_q_1)
 define_mpn(bdiv_dbm1c)
 define_mpn(cmp)
+define_mpn(cnd_add_n)
+define_mpn(cnd_sub_n)
 define_mpn(com)
 define_mpn(copyd)
 define_mpn(copyi)
@@ -1448,7 +1449,6 @@
 define_mpn(sqr_diagonal)
 define_mpn(sqr_diag_addlsh1)
 define_mpn(sub_n)
-define_mpn(subcnd_n)
 define_mpn(sublsh1_n)
 define_mpn(sublsh1_nc)
 define_mpn(sublsh1_n_ip1)
diff --git a/mpn/generic/addcnd_n.c b/mpn/generic/cnd_add_n.c
rename from mpn/generic/addcnd_n.c
rename to mpn/generic/cnd_add_n.c
--- a/mpn/generic/addcnd_n.c
+++ b/mpn/generic/cnd_add_n.c
@@ -1,4 +1,4 @@
-/* mpn_addcnd_n -- Compute R = U + V if CND != 0 or R = U if CND == 0.
+/* mpn_cnd_add_n -- Compute R = U + V if CND != 0 or R = U if CND == 0.
    Both cases should take the same time and perform the exact same memory
    accesses, since this function is intended to be used where side-channel
    attack resilience is relevant.
@@ -28,7 +28,7 @@
 #include "gmp-impl.h"
 
 mp_limb_t
-mpn_addcnd_n (mp_limb_t cnd, mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n)
+mpn_cnd_add_n (mp_limb_t cnd, mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n)
 {
   mp_limb_t ul, vl, sl, rl, cy, cy1, cy2, mask;
 
diff --git a/mpn/generic/subcnd_n.c b/mpn/generic/cnd_sub_n.c
rename from mpn/generic/subcnd_n.c
rename to mpn/generic/cnd_sub_n.c
--- a/mpn/generic/subcnd_n.c
+++ b/mpn/generic/cnd_sub_n.c
@@ -1,4 +1,4 @@
-/* mpn_subcnd_n -- Compute R = U - V if CND != 0 or R = U if CND == 0.
+/* mpn_cnd_sub_n -- Compute R = U - V if CND != 0 or R = U if CND == 0.
    Both cases should take the same time and perform the exact same memory
    accesses, since this function is intended to be used where side-channel
    attack resilience is relevant.
@@ -28,7 +28,7 @@
 #include "gmp-impl.h"
 
 mp_limb_t
-mpn_subcnd_n (mp_limb_t cnd, mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n)
+mpn_cnd_sub_n (mp_limb_t cnd, mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n)
 {
   mp_limb_t ul, vl, sl, rl, cy, cy1, cy2, mask;
 
diff --git a/mpn/generic/powm_sec.c b/mpn/generic/powm_sec.c
--- a/mpn/generic/powm_sec.c
+++ b/mpn/generic/powm_sec.c
@@ -63,7 +63,7 @@
   do {									\
     mp_limb_t cy;							\
     cy = mpn_redc_1 (rp, up, mp, n, invm);				\
-    mpn_subcnd_n (cy, rp, rp, mp, n);					\
+    mpn_cnd_sub_n (cy, rp, rp, mp, n);					\
   } while (0)
 
 #undef MPN_REDC_2_SEC
@@ -71,7 +71,7 @@
   do {									\
     mp_limb_t cy;							\
     cy = mpn_redc_2 (rp, up, mp, n, mip);				\
-    mpn_subcnd_n (cy, rp, rp, mp, n);					\
+    mpn_cnd_sub_n (cy, rp, rp, mp, n);					\
   } while (0)
 
 #if HAVE_NATIVE_mpn_addmul_2 || HAVE_NATIVE_mpn_redc_2
@@ -418,7 +418,7 @@
   MPN_REDC_1_SEC (rp, tp, mp, n, mip[0]);
 #endif
   cnd = mpn_sub_n (tp, rp, mp, n);	/* we need just retval */
-  mpn_subcnd_n (!cnd, rp, rp, mp, n);
+  mpn_cnd_sub_n (!cnd, rp, rp, mp, n);
 }
 
 mp_size_t
diff --git a/mpn/generic/sbpi1_div_sec.c b/mpn/generic/sbpi1_div_sec.c
--- a/mpn/generic/sbpi1_div_sec.c
+++ b/mpn/generic/sbpi1_div_sec.c
@@ -64,7 +64,7 @@
   if (nn == dn)
     {
       cy = mpn_sub_n (np, np, dp, dn);
-      mpn_addcnd_n (cy, np, np, dp, dn);
+      mpn_cnd_add_n (cy, np, np, dp, dn);
 #if OPERATION_sbpi1_div_qr_sec
       return 1 - cy;
 #else
@@ -124,7 +124,7 @@
 #if OPERATION_sbpi1_div_qr_sec
   qlp[0] += h;
 #endif
-  h -= mpn_subcnd_n (h, np, np, dp, dn);
+  h -= mpn_cnd_sub_n (h, np, np, dp, dn);
 
   /* 2nd adjustment depends on remainder/divisor comparision as well as whether
      extra remainder limb was nullified by previous subtract.  */
@@ -133,7 +133,7 @@
 #if OPERATION_sbpi1_div_qr_sec
   qlp[0] += cy;
 #endif
-  mpn_addcnd_n (1 - cy, np, np, dp, dn);
+  mpn_cnd_add_n (1 - cy, np, np, dp, dn);
 
   /* Combine quotient halves into final quotient.  */
 #if OPERATION_sbpi1_div_qr_sec
diff --git a/mpn/powerpc64/mode64/aorscnd_n.asm b/mpn/powerpc64/mode64/cnd_aors_n.asm
rename from mpn/powerpc64/mode64/aorscnd_n.asm
rename to mpn/powerpc64/mode64/cnd_aors_n.asm
--- a/mpn/powerpc64/mode64/aorscnd_n.asm
+++ b/mpn/powerpc64/mode64/cnd_aors_n.asm
@@ -1,4 +1,4 @@
-dnl  PowerPC-64 mpn_addcnd_n/mpn_subcnd_n.
+dnl  PowerPC-64 mpn_cnd_add_n/mpn_cnd_sub_n.
 
 dnl  Copyright 1999, 2000, 2001, 2003, 2004, 2005, 2007, 2011, 2012 Free
 dnl  Software Foundation, Inc.
@@ -34,24 +34,24 @@
 define(`vp',   `r6')
 define(`n',    `r7')
 
-ifdef(`OPERATION_addcnd_n',`
+ifdef(`OPERATION_cnd_add_n',`
   define(ADDSUBC,	adde)
   define(ADDSUB,	addc)
-  define(func,		mpn_addcnd_n)
+  define(func,		mpn_cnd_add_n)
   define(GENRVAL,	`addi	r3, r3, 1')
   define(SETCBR,	`addic	r0, $1, -1')
   define(CLRCB,		`addic	r0, r0, 0')
 ')
-ifdef(`OPERATION_subcnd_n',`
+ifdef(`OPERATION_cnd_sub_n',`
   define(ADDSUBC,	subfe)
   define(ADDSUB,	subfc)
-  define(func,		mpn_subcnd_n)
+  define(func,		mpn_cnd_sub_n)
   define(GENRVAL,	`neg	r3, r3')
   define(SETCBR,	`subfic	r0, $1, 0')
   define(CLRCB,		`addic	r0, r1, -1')
 ')
 
-MULFUNC_PROLOGUE(mpn_addcnd_n mpn_subcnd_n)
+MULFUNC_PROLOGUE(mpn_cnd_add_n mpn_cnd_sub_n)
 
 ASM_START()
 PROLOGUE(func)
diff --git a/mpn/x86_64/aorscnd_n.asm b/mpn/x86_64/cnd_aors_n.asm
rename from mpn/x86_64/aorscnd_n.asm
rename to mpn/x86_64/cnd_aors_n.asm
--- a/mpn/x86_64/aorscnd_n.asm
+++ b/mpn/x86_64/cnd_aors_n.asm
@@ -1,4 +1,4 @@
-dnl  AMD64 mpn_addcnd_n, mpn_subcnd_n
+dnl  AMD64 mpn_cnd_add_n, mpn_cnd_sub_n
 
 dnl  Copyright 2011, 2012, 2013 Free Software Foundation, Inc.
 
@@ -37,8 +37,8 @@
 C    false, and since cmov's documentation is not clear about wheather it
 C    actually reads both source operands and writes the register for a false
 C    condition, we cannot use it.
-C  * Two cases could be optimised: (1) addcnd_n could use ADCSBB-from-memory
-C    to save one insn/limb, and (2) when up=rp addcnd_n and subcnd_n could use
+C  * Two cases could be optimised: (1) cnd_add_n could use ADCSBB-from-memory
+C    to save one insn/limb, and (2) when up=rp cnd_add_n and cnd_sub_n could use
 C    ADCSBB-to-memory, again saving 1 insn/limb.
 C  * This runs optimally at decoder bandwidth on K10.  It has not been tuned
 C    for any other processor.
@@ -50,16 +50,16 @@
 define(`vp',	`%rcx')	dnl r9
 define(`n',	`%r8')	dnl rsp+40
 
-ifdef(`OPERATION_addcnd_n', `
+ifdef(`OPERATION_cnd_add_n', `
 	define(ADDSUB,	      add)
 	define(ADCSBB,	      adc)
-	define(func,	      mpn_addcnd_n)')
-ifdef(`OPERATION_subcnd_n', `
+	define(func,	      mpn_cnd_add_n)')
+ifdef(`OPERATION_cnd_sub_n', `
 	define(ADDSUB,	      sub)
 	define(ADCSBB,	      sbb)
-	define(func,	      mpn_subcnd_n)')
+	define(func,	      mpn_cnd_sub_n)')
 
-MULFUNC_PROLOGUE(mpn_addcnd_n mpn_subcnd_n)
+MULFUNC_PROLOGUE(mpn_cnd_add_n mpn_cnd_sub_n)
 
 ABI_SUPPORT(DOS64)
 ABI_SUPPORT(STD64)
diff --git a/tests/devel/try.c b/tests/devel/try.c
--- a/tests/devel/try.c
+++ b/tests/devel/try.c
@@ -747,12 +747,12 @@
   p = &param[TYPE_ADDCND_N];
   COPY (TYPE_ADD_N);
   p->carry = CARRY_BIT;
-  REFERENCE (refmpn_addcnd_n);
+  REFERENCE (refmpn_cnd_add_n);
 
   p = &param[TYPE_SUBCND_N];
   COPY (TYPE_ADD_N);
   p->carry = CARRY_BIT;
-  REFERENCE (refmpn_subcnd_n);
+  REFERENCE (refmpn_cnd_sub_n);
 
 
   p = &param[TYPE_MUL_1];
@@ -1716,8 +1716,8 @@
   { TRY(mpn_copyd), TYPE_COPYD },
 #endif
 
-  { TRY(mpn_addcnd_n), TYPE_ADDCND_N },
-  { TRY(mpn_subcnd_n), TYPE_SUBCND_N },
+  { TRY(mpn_cnd_add_n), TYPE_ADDCND_N },
+  { TRY(mpn_cnd_sub_n), TYPE_SUBCND_N },
 #if HAVE_NATIVE_mpn_addlsh1_n
   { TRY(mpn_addlsh1_n), TYPE_ADDLSH1_N },
 #endif
diff --git a/tests/refmpn.c b/tests/refmpn.c
--- a/tests/refmpn.c
+++ b/tests/refmpn.c
@@ -597,7 +597,7 @@
 }
 
 mp_limb_t
-refmpn_addcnd_n (mp_limb_t cnd, mp_ptr rp, mp_srcptr s1p, mp_srcptr s2p, mp_size_t size)
+refmpn_cnd_add_n (mp_limb_t cnd, mp_ptr rp, mp_srcptr s1p, mp_srcptr s2p, mp_size_t size)
 {
   if (cnd != 0)
     return refmpn_add_n (rp, s1p, s2p, size);
@@ -608,7 +608,7 @@
     }
 }
 mp_limb_t
-refmpn_subcnd_n (mp_limb_t cnd, mp_ptr rp, mp_srcptr s1p, mp_srcptr s2p, mp_size_t size)
+refmpn_cnd_sub_n (mp_limb_t cnd, mp_ptr rp, mp_srcptr s1p, mp_srcptr s2p, mp_size_t size)
 {
   if (cnd != 0)
     return refmpn_sub_n (rp, s1p, s2p, size);
diff --git a/tests/tests.h b/tests/tests.h
--- a/tests/tests.h
+++ b/tests/tests.h
@@ -162,8 +162,8 @@
 int refmpf_validate_division (const char *, mpf_srcptr, mpf_srcptr, mpf_srcptr);
 
 
-mp_limb_t refmpn_addcnd_n (mp_limb_t, mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
-mp_limb_t refmpn_subcnd_n (mp_limb_t, mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
+mp_limb_t refmpn_cnd_add_n (mp_limb_t, mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
+mp_limb_t refmpn_cnd_sub_n (mp_limb_t, mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
 
 mp_limb_t refmpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t);
 mp_limb_t refmpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t);
diff --git a/tune/common.c b/tune/common.c
--- a/tune/common.c
+++ b/tune/common.c
@@ -1131,14 +1131,14 @@
 #endif
 
 double
-speed_mpn_addcnd_n (struct speed_params *s)
+speed_mpn_cnd_add_n (struct speed_params *s)
 {
-  SPEED_ROUTINE_MPN_BINARY_N_CALL (mpn_addcnd_n (1, wp, xp, yp, s->size));
+  SPEED_ROUTINE_MPN_BINARY_N_CALL (mpn_cnd_add_n (1, wp, xp, yp, s->size));
 }
 double
-speed_mpn_subcnd_n (struct speed_params *s)
+speed_mpn_cnd_sub_n (struct speed_params *s)
 {
-  SPEED_ROUTINE_MPN_BINARY_N_CALL (mpn_subcnd_n (1, wp, xp, yp, s->size));
+  SPEED_ROUTINE_MPN_BINARY_N_CALL (mpn_cnd_sub_n (1, wp, xp, yp, s->size));
 }
 
 /* mpn_and_n etc can be macros and so have to be handled with
diff --git a/tune/speed.c b/tune/speed.c
--- a/tune/speed.c
+++ b/tune/speed.c
@@ -474,8 +474,8 @@
   { "mpn_rsh1sub_n",     speed_mpn_rsh1sub_n, FLAG_R_OPTIONAL },
 #endif
 
-  { "mpn_addcnd_n",     speed_mpn_addcnd_n, FLAG_R_OPTIONAL },
-  { "mpn_subcnd_n",     speed_mpn_subcnd_n, FLAG_R_OPTIONAL },
+  { "mpn_cnd_add_n",     speed_mpn_cnd_add_n, FLAG_R_OPTIONAL },
+  { "mpn_cnd_sub_n",     speed_mpn_cnd_sub_n, FLAG_R_OPTIONAL },
 
   { "MPN_ZERO",          speed_MPN_ZERO             },
 
diff --git a/tune/speed.h b/tune/speed.h
--- a/tune/speed.h
+++ b/tune/speed.h
@@ -148,7 +148,6 @@
 double speed_mpn_add_err1_n (struct speed_params *);
 double speed_mpn_add_err2_n (struct speed_params *);
 double speed_mpn_add_err3_n (struct speed_params *);
-double speed_mpn_addcnd_n (struct speed_params *);
 double speed_mpn_addlsh_n (struct speed_params *);
 double speed_mpn_addlsh1_n (struct speed_params *);
 double speed_mpn_addlsh2_n (struct speed_params *);
@@ -169,6 +168,8 @@
 double speed_mpn_addmul_6 (struct speed_params *);
 double speed_mpn_addmul_7 (struct speed_params *);
 double speed_mpn_addmul_8 (struct speed_params *);
+double speed_mpn_cnd_add_n (struct speed_params *);
+double speed_mpn_cnd_sub_n (struct speed_params *);
 double speed_mpn_com (struct speed_params *);
 double speed_mpn_copyd (struct speed_params *);
 double speed_mpn_copyi (struct speed_params *);
@@ -314,7 +315,6 @@
 double speed_mpn_sub_err1_n (struct speed_params *);
 double speed_mpn_sub_err2_n (struct speed_params *);
 double speed_mpn_sub_err3_n (struct speed_params *);
-double speed_mpn_subcnd_n (struct speed_params *);
 double speed_mpn_sublsh_n (struct speed_params *);
 double speed_mpn_sublsh1_n (struct speed_params *);
 double speed_mpn_sublsh2_n (struct speed_params *);

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.


More information about the gmp-devel mailing list