[Gmp-commit] /var/hg/gmp-5.0: (SQR_BASECASE_MAX): Set safely from SQR_TOOM2_T...
mercurial at gmplib.org
mercurial at gmplib.org
Tue Jan 31 11:21:27 CET 2012
details: /var/hg/gmp-5.0/rev/5860df7ea802
changeset: 13531:5860df7ea802
user: Torbjorn Granlund <tege at gmplib.org>
date: Tue Jan 31 11:21:22 2012 +0100
description:
(SQR_BASECASE_MAX): Set safely from SQR_TOOM2_THRESHOLD.
diffstat:
ChangeLog | 5 +++++
mpn/generic/powm_sec.c | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diffs (33 lines):
diff -r 7e81d4a47403 -r 5860df7ea802 ChangeLog
--- a/ChangeLog Mon Jan 30 16:31:12 2012 +0100
+++ b/ChangeLog Tue Jan 31 11:21:22 2012 +0100
@@ -1,3 +1,8 @@
+2012-01-31 Torbjorn Granlund <tege at gmplib.org>
+
+ * mpn/generic/powm_sec.c (SQR_BASECASE_MAX): Set safely from
+ SQR_TOOM2_THRESHOLD.
+
2012-01-30 Torbjorn Granlund <tege at gmplib.org>
* tests/mpz/t-powm.c: Ensure all sizes are seen.
diff -r 7e81d4a47403 -r 5860df7ea802 mpn/generic/powm_sec.c
--- a/mpn/generic/powm_sec.c Mon Jan 30 16:31:12 2012 +0100
+++ b/mpn/generic/powm_sec.c Tue Jan 31 11:21:22 2012 +0100
@@ -82,7 +82,7 @@
#if ! HAVE_NATIVE_mpn_sqr_basecase
/* The limit of the generic code is SQR_TOOM2_THRESHOLD. */
-#define SQR_BASECASE_MAX SQR_TOOM2_THRESHOLD
+#define SQR_BASECASE_MAX (SQR_TOOM2_THRESHOLD - 1)
#endif
#if HAVE_NATIVE_mpn_sqr_basecase
@@ -91,7 +91,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
More information about the gmp-commit
mailing list