[Gmp-commit] /var/hg/gmp: Use mpn_local_sqr in new squaring code.

mercurial at gmplib.org mercurial at gmplib.org
Fri Mar 23 22:59:56 UTC 2018


details:   /var/hg/gmp/rev/cd4716561151
changeset: 17589:cd4716561151
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Fri Mar 23 23:59:53 2018 +0100
description:
Use mpn_local_sqr in new squaring code.

diffstat:

 mpn/generic/sec_powm.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 2c60d7137ef8 -r cd4716561151 mpn/generic/sec_powm.c
--- a/mpn/generic/sec_powm.c	Fri Mar 23 16:47:06 2018 +0100
+++ b/mpn/generic/sec_powm.c	Fri Mar 23 23:59:53 2018 +0100
@@ -260,7 +260,7 @@
     {
       for (i = (1 << windowsize) - 2; i > 0; i -= 2)
 	{
-	  mpn_sqr_basecase (tp, ps, n); /* FIXME: use mpn_local_sqr */
+	  mpn_local_sqr (tp, ps, n, tp + 2 * n);
 	  ps += n;
 	  this_pp += n;
 	  MPN_REDC_1_SEC (this_pp, tp, mp, n, mip[0]);
@@ -274,7 +274,7 @@
     {
       for (i = (1 << windowsize) - 2; i > 0; i -= 2)
 	{
-	  mpn_sqr_basecase (tp, ps, n); /* FIXME: use mpn_local_sqr */
+	  mpn_local_sqr (tp, ps, n, tp + 2 * n);
 	  ps += n;
 	  this_pp += n;
 	  MPN_REDC_2_SEC (this_pp, tp, mp, n, mip);


More information about the gmp-commit mailing list