[Gmp-commit] /var/hg/gmp: 4 new changesets

mercurial at gmplib.org mercurial at gmplib.org
Fri Dec 30 22:32:39 CET 2011


details:   /var/hg/gmp/rev/9975821c456a
changeset: 14551:9975821c456a
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Fri Dec 30 21:53:57 2011 +0100
description:
(SQR_BASECASE_MAX): Set safely from SQR_TOOM2_THRESHOLD.

details:   /var/hg/gmp/rev/713bd587f076
changeset: 14552:713bd587f076
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Fri Dec 30 21:54:07 2011 +0100
description:
*** empty log message ***

details:   /var/hg/gmp/rev/25a9cfe0bd49
changeset: 14553:25a9cfe0bd49
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Fri Dec 30 22:10:06 2011 +0100
description:
Fix typo in a return statement.

details:   /var/hg/gmp/rev/10f35b73be0d
changeset: 14554:10f35b73be0d
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Fri Dec 30 22:10:14 2011 +0100
description:
*** empty log message ***

diffstat:

 ChangeLog              |  7 +++++++
 mpn/generic/powm_sec.c |  2 +-
 mpz/hamdist.c          |  5 +++--
 3 files changed, 11 insertions(+), 3 deletions(-)

diffs (47 lines):

diff -r 645e645e5f27 -r 10f35b73be0d ChangeLog
--- a/ChangeLog	Sat Dec 17 12:59:44 2011 +0100
+++ b/ChangeLog	Fri Dec 30 22:10:14 2011 +0100
@@ -1,3 +1,10 @@
+2011-12-30  Torbjorn Granlund  <tege at gmplib.org>
+
+	* mpz/hamdist.c: Fix typo in a return statement.
+
+	* mpn/generic/powm_sec.c (SQR_BASECASE_MAX): Set safely from
+	SQR_TOOM2_THRESHOLD.
+
 2011-12-17  Torbjorn Granlund  <tege at gmplib.org>
 
 	* tests/mpz/t-perfpow.c: Decrease default # of tests.
diff -r 645e645e5f27 -r 10f35b73be0d mpn/generic/powm_sec.c
--- a/mpn/generic/powm_sec.c	Sat Dec 17 12:59:44 2011 +0100
+++ b/mpn/generic/powm_sec.c	Fri Dec 30 22:10:14 2011 +0100
@@ -99,7 +99,7 @@
    mpn_sqr_basecase, it comes from SQR_TOOM2_THRESHOLD_MAX in the assembly
    file.  An assembly mpn_sqr_basecase that does not define it, should allow
    any size.  */
-#define SQR_BASECASE_MAX  SQR_TOOM2_THRESHOLD
+#define SQR_BASECASE_MAX  (SQR_TOOM2_THRESHOLD - 1)
 #endif
 #endif
 
diff -r 645e645e5f27 -r 10f35b73be0d mpz/hamdist.c
--- a/mpz/hamdist.c	Sat Dec 17 12:59:44 2011 +0100
+++ b/mpz/hamdist.c	Fri Dec 30 22:10:14 2011 +0100
@@ -1,6 +1,7 @@
 /* mpz_hamdist -- calculate hamming distance.
 
-Copyright 1994, 1996, 2001, 2002 Free Software Foundation, Inc.
+Copyright 1994, 1996, 2001, 2002, 2009, 2010, 2011 Free Software Foundation,
+Inc.
 
 This file is part of the GNU MP Library.
 
@@ -60,7 +61,7 @@
       mp_size_t  old_vsize, step;
 
       if (vsize >= 0)
-	return ~ (mp_limb_t) 0;
+	return ~ (mp_bitcnt_t) 0;
 
       /* negative/negative */
 


More information about the gmp-commit mailing list