[Gmp-commit] /var/hg/gmp: 3 new changesets
mercurial at gmplib.org
mercurial at gmplib.org
Sat Mar 3 16:55:09 CET 2012
details: /var/hg/gmp/rev/ab58c86c8d13
changeset: 14718:ab58c86c8d13
user: Torbjorn Granlund <tege at gmplib.org>
date: Sat Mar 03 16:51:36 2012 +0100
description:
Whitespace cleanup.
details: /var/hg/gmp/rev/2afc3015d805
changeset: 14719:2afc3015d805
user: Torbjorn Granlund <tege at gmplib.org>
date: Sat Mar 03 16:52:42 2012 +0100
description:
Whitespace cleanup.
details: /var/hg/gmp/rev/31fafe3874d1
changeset: 14720:31fafe3874d1
user: Torbjorn Granlund <tege at gmplib.org>
date: Sat Mar 03 16:54:51 2012 +0100
description:
Add a parameter ASSERT.
diffstat:
configure.in | 4 ++--
mini-gmp/tests/t-bitops.c | 8 ++++----
mpn/generic/redc_n.c | 6 +++++-
3 files changed, 11 insertions(+), 7 deletions(-)
diffs (90 lines):
diff -r c9fbbeea4143 -r 31fafe3874d1 configure.in
--- a/configure.in Sat Mar 03 16:34:31 2012 +0100
+++ b/configure.in Sat Mar 03 16:54:51 2012 +0100
@@ -1054,7 +1054,7 @@
# asm macros to be right of course.)
#
# gcc64 was an early port of gcc to 64-bit mode, but should be
- # obsolete before too long. We prefer plain gcc when it knows
+ # obsolete before too long. We prefer plain gcc when it knows
# 64-bits.
#
abilist="mode64 mode32 $abilist"
@@ -3602,7 +3602,7 @@
Shared libraries: ${enable_shared}
])
-if test x$cross_compiling = xyes ; then
+if test x$cross_compiling = xyes ; then
case "$host" in
*-*-mingw* | *-*-cygwin)
if test x$ABI = x64 ; then
diff -r c9fbbeea4143 -r 31fafe3874d1 mini-gmp/tests/t-bitops.c
--- a/mini-gmp/tests/t-bitops.c Sat Mar 03 16:34:31 2012 +0100
+++ b/mini-gmp/tests/t-bitops.c Sat Mar 03 16:54:51 2012 +0100
@@ -27,7 +27,7 @@
mpz_init (a);
mpz_init (res);
mpz_init (ref);
-
+
for (i = 0; i < COUNT; i++)
{
mini_random_bit_op (OP_SETBIT, MAXBITS, a, &b, ref);
@@ -48,7 +48,7 @@
dump ("res", a);
fprintf (stderr, "b: %lu\n", b);
abort ();
- }
+ }
mini_random_bit_op (OP_CLRBIT, MAXBITS, a, &b, ref);
mpz_set (res, a);
mpz_clrbit (res, b);
@@ -67,7 +67,7 @@
dump ("res", a);
fprintf (stderr, "b: %lu\n", b);
abort ();
- }
+ }
mini_random_bit_op (OP_COMBIT, MAXBITS, a, &b, ref);
mpz_set (res, a);
mpz_combit (res, b);
@@ -86,7 +86,7 @@
dump ("res", a);
fprintf (stderr, "b: %lu\n", b);
abort ();
- }
+ }
}
mpz_clear (a);
mpz_clear (res);
diff -r c9fbbeea4143 -r 31fafe3874d1 mpn/generic/redc_n.c
--- a/mpn/generic/redc_n.c Sat Mar 03 16:34:31 2012 +0100
+++ b/mpn/generic/redc_n.c Sat Mar 03 16:54:51 2012 +0100
@@ -4,7 +4,7 @@
THIS IS AN INTERNAL FUNCTION WITH A MUTABLE INTERFACE. IT IS ONLY
SAFE TO REACH THIS FUNCTION THROUGH DOCUMENTED INTERFACES.
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright 2009, 2012 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -32,6 +32,8 @@
assumption.
* Decrease scratch usage.
+
+ * Consider removing the residue canonicalisation.
*/
void
@@ -43,6 +45,8 @@
TMP_DECL;
TMP_MARK;
+ ASSERT (n > 8);
+
rn = mpn_mulmod_bnm1_next_size (n);
scratch = TMP_ALLOC_LIMBS (n + rn + mpn_mulmod_bnm1_itch (rn, n, n));
More information about the gmp-commit
mailing list