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

mercurial at gmplib.org mercurial at gmplib.org
Mon Feb 21 01:58:04 CET 2022


details:   /var/hg/gmp/rev/0addf7fc3de6
changeset: 18310:0addf7fc3de6
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Mon Feb 21 01:49:36 2022 +0100
description:
mpn/generic/strongfibo.c: Correct an #if condition (avoid #else)

details:   /var/hg/gmp/rev/7018143052a2
changeset: 18311:7018143052a2
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Mon Feb 21 01:50:12 2022 +0100
description:
Copyright years

details:   /var/hg/gmp/rev/b4f3a32deac9
changeset: 18312:b4f3a32deac9
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Mon Feb 21 01:57:56 2022 +0100
description:
gmp-impl.h (MPN_{MUL,SQR}MOD_BKNP1_USABLE): Add parentheses to avoid warnings

diffstat:

 configure.ac             |   2 +-
 gmp-impl.h               |  54 +++++++++++++++++++++++++----------------------
 mpn/generic/strongfibo.c |   3 +-
 mpz/gcd_ui.c             |  14 ++++++------
 tests/mpn/Makefile.am    |   2 +-
 tune/common.c            |   2 +-
 tune/speed.c             |   2 +-
 tune/speed.h             |   2 +-
 8 files changed, 43 insertions(+), 38 deletions(-)

diffs (177 lines):

diff -r f4f4f6030f8f -r b4f3a32deac9 configure.ac
--- a/configure.ac	Tue Feb 15 09:18:40 2022 +0100
+++ b/configure.ac	Mon Feb 21 01:57:56 2022 +0100
@@ -3,7 +3,7 @@
 
 define(GMP_COPYRIGHT,[[
 
-Copyright 1996-2020 Free Software Foundation, Inc.
+Copyright 1996-2022 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
diff -r f4f4f6030f8f -r b4f3a32deac9 gmp-impl.h
--- a/gmp-impl.h	Tue Feb 15 09:18:40 2022 +0100
+++ b/gmp-impl.h	Mon Feb 21 01:57:56 2022 +0100
@@ -3,7 +3,7 @@
    THE CONTENTS OF THIS FILE ARE FOR INTERNAL USE AND ARE ALMOST CERTAIN TO
    BE SUBJECT TO INCOMPATIBLE CHANGES IN FUTURE GNU MP RELEASES.
 
-Copyright 1991-2018, 2021 Free Software Foundation, Inc.
+Copyright 1991-2018, 2021, 2022 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
@@ -1294,18 +1294,20 @@
    (((rn) % ((k) = 3) == 0)))
 #else
 #define MPN_MULMOD_BKNP1_USABLE(rn, k, mn)				\
-  ((GMP_NUMB_BITS % 8 == 0) && ((mn) >= 18) && ((rn) > 16) &&		\
-   (((rn) % ((k) = 3) == 0) ||						\
-    ((GMP_NUMB_BITS % 16 != 0) || ((mn) >= 35) && ((rn) >= 32)) &&	\
-    ((GMP_NUMB_BITS % 16 == 0) && ((rn) % ((k) = 5) == 0) ||		\
-     ((mn) >= 49) &&							\
-     (((rn) % ((k) = 7) == 0) ||					\
-      (GMP_NUMB_BITS % 16 == 0) && ((mn) >= 104) && ((rn) >= 64) &&	\
-      ((MOD_BKNP1_USE11 && ((rn) % ((k) = 11) == 0)) ||			\
-       ((rn) % ((k) = 13) == 0) ||					\
-       (GMP_NUMB_BITS % 32 == 0) && ((mn) >= 136) && ((rn) >= 128) &&	\
-       ((rn) % ((k) = 17) == 0)						\
-       )))))
+  (((GMP_NUMB_BITS % 8 == 0) && ((mn) >= 18) && ((rn) > 16) &&		\
+    (((rn) % ((k) = 3) == 0) ||						\
+     (((GMP_NUMB_BITS % 16 != 0) || (((mn) >= 35) && ((rn) >= 32))) &&	\
+      (((GMP_NUMB_BITS % 16 == 0) && ((rn) % ((k) = 5) == 0)) ||	\
+       (((mn) >= 49) &&							\
+	(((rn) % ((k) = 7) == 0) ||					\
+	 ((GMP_NUMB_BITS % 16 == 0) && ((mn) >= 104) && ((rn) >= 64) &&	\
+	  ((MOD_BKNP1_USE11 && ((rn) % ((k) = 11) == 0)) ||		\
+	   ((rn) % ((k) = 13) == 0) ||					\
+	   ((GMP_NUMB_BITS % 32 == 0) && ((mn) >= 136) && ((rn) >= 128) && \
+	    ((rn) % ((k) = 17) == 0)					\
+	    ))))))))) ||						\
+  ((GMP_NUMB_BITS % 16 != 0) && MOD_BKNP1_USE11 &&			\
+   ((mn) >= 104) && ((rn) >= 64) && ((rn) % ((k) = 11) == 0)) )
 #endif
 
 #define mpn_sqrmod_bknp1 __MPN(sqrmod_bknp1)
@@ -1319,18 +1321,20 @@
   MPN_MULMOD_BKNP1_USABLE(rn, k, mn)
 #else
 #define MPN_SQRMOD_BKNP1_USABLE(rn, k, mn)				\
-  ((GMP_NUMB_BITS % 8 == 0) && ((mn) >= 27) && ((rn) > 24) &&		\
-   (((rn) % ((k) = 3) == 0) ||						\
-    ((GMP_NUMB_BITS % 16 != 0) || ((mn) >= 55) && ((rn) > 50)) &&	\
-    ((GMP_NUMB_BITS % 16 == 0) && ((rn) % ((k) = 5) == 0) ||		\
-     ((mn) >= 56) &&							\
-     (((rn) % ((k) = 7) == 0) ||					\
-      (GMP_NUMB_BITS % 16 == 0) && ((mn) >= 143) && ((rn) >= 128) &&	\
-      ((MOD_BKNP1_USE11 && ((rn) % ((k) = 11) == 0)) ||			\
-       ((rn) % ((k) = 13) == 0) ||					\
-       (GMP_NUMB_BITS % 32 == 0) && ((mn) >= 272) && ((rn) >= 256) &&	\
-       ((rn) % ((k) = 17) == 0)						\
-       )))))
+  (((GMP_NUMB_BITS % 8 == 0) && ((mn) >= 27) && ((rn) > 24) &&		\
+    (((rn) % ((k) = 3) == 0) ||						\
+     (((GMP_NUMB_BITS % 16 != 0) || (((mn) >= 55) && ((rn) > 50))) &&	\
+      (((GMP_NUMB_BITS % 16 == 0) && ((rn) % ((k) = 5) == 0)) ||	\
+       (((mn) >= 56) &&							\
+	(((rn) % ((k) = 7) == 0) ||					\
+	 ((GMP_NUMB_BITS % 16 == 0) && ((mn) >= 143) && ((rn) >= 128) && \
+	  ((MOD_BKNP1_USE11 && ((rn) % ((k) = 11) == 0)) ||		\
+	   ((rn) % ((k) = 13) == 0) ||					\
+	   ((GMP_NUMB_BITS % 32 == 0) && ((mn) >= 272) && ((rn) >= 256) && \
+	    ((rn) % ((k) = 17) == 0)					\
+	    ))))))))) ||						\
+   ((GMP_NUMB_BITS % 16 != 0) && MOD_BKNP1_USE11 &&			\
+    ((mn) >= 143) && ((rn) >= 128) && ((rn) % ((k) = 11) == 0)) )
 #endif
 
 
diff -r f4f4f6030f8f -r b4f3a32deac9 mpn/generic/strongfibo.c
--- a/mpn/generic/strongfibo.c	Tue Feb 15 09:18:40 2022 +0100
+++ b/mpn/generic/strongfibo.c	Mon Feb 21 01:57:56 2022 +0100
@@ -38,7 +38,8 @@
 #include "gmp-impl.h"
 
 
-#if ! HAVE_NATIVE_mpn_rsblsh1_n && ! HAVE_NATIVE_mpn_sublsh1_n
+#if HAVE_NATIVE_mpn_rsblsh1_n || HAVE_NATIVE_mpn_sublsh1_n
+#else
 /* Stores |{ap,n}-{bp,n}| in {rp,n},
    returns the sign of {ap,n}-{bp,n}. */
 static int
diff -r f4f4f6030f8f -r b4f3a32deac9 mpz/gcd_ui.c
--- a/mpz/gcd_ui.c	Tue Feb 15 09:18:40 2022 +0100
+++ b/mpz/gcd_ui.c	Mon Feb 21 01:57:56 2022 +0100
@@ -1,6 +1,6 @@
 /* mpz_gcd_ui -- Calculate the greatest common divisor of two integers.
 
-Copyright 1994, 1996, 1999-2004, 2015 Free Software Foundation, Inc.
+Copyright 1994, 1996, 1999-2004, 2015, 2022 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
@@ -44,12 +44,12 @@
       mp_limb_t vlimbs[2], wlimbs[2];
 
       if (w == NULL)
-       {
-         PTR(lw) = wlimbs;
-         ALLOC(lw) = 2;
-         SIZ(lw) = 0;
-         w = lw;
-       }
+	{
+	  PTR(lw) = wlimbs;
+	  ALLOC(lw) = 2;
+	  SIZ(lw) = 0;
+	  w = lw;
+	}
       vlimbs[0] = v & GMP_NUMB_MASK;
       vlimbs[1] = v >> GMP_NUMB_BITS;
       PTR(vz) = vlimbs;
diff -r f4f4f6030f8f -r b4f3a32deac9 tests/mpn/Makefile.am
--- a/tests/mpn/Makefile.am	Tue Feb 15 09:18:40 2022 +0100
+++ b/tests/mpn/Makefile.am	Mon Feb 21 01:57:56 2022 +0100
@@ -1,6 +1,6 @@
 ## Process this file with automake to generate Makefile.in
 
-# Copyright 2001-2003, 2009-2014, 2018 Free Software Foundation, Inc.
+# Copyright 2001-2003, 2009-2014, 2018, 2019, 2021, 2022 Free Software Foundation, Inc.
 #
 # This file is part of the GNU MP Library test suite.
 #
diff -r f4f4f6030f8f -r b4f3a32deac9 tune/common.c
--- a/tune/common.c	Tue Feb 15 09:18:40 2022 +0100
+++ b/tune/common.c	Mon Feb 21 01:57:56 2022 +0100
@@ -1,6 +1,6 @@
 /* Shared speed subroutines.
 
-Copyright 1999-2006, 2008-2017, 2019 Free Software Foundation, Inc.
+Copyright 1999-2006, 2008-2017, 2019-2022 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
diff -r f4f4f6030f8f -r b4f3a32deac9 tune/speed.c
--- a/tune/speed.c	Tue Feb 15 09:18:40 2022 +0100
+++ b/tune/speed.c	Mon Feb 21 01:57:56 2022 +0100
@@ -1,6 +1,6 @@
 /* Speed measuring program.
 
-Copyright 1999-2003, 2005, 2006, 2008-2021 Free Software Foundation, Inc.
+Copyright 1999-2003, 2005, 2006, 2008-2022 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
diff -r f4f4f6030f8f -r b4f3a32deac9 tune/speed.h
--- a/tune/speed.h	Tue Feb 15 09:18:40 2022 +0100
+++ b/tune/speed.h	Mon Feb 21 01:57:56 2022 +0100
@@ -1,6 +1,6 @@
 /* Header for speed and threshold things.
 
-Copyright 1999-2003, 2005, 2006, 2008-2017, 2019-2021 Free Software
+Copyright 1999-2003, 2005, 2006, 2008-2017, 2019-2022 Free Software
 Foundation, Inc.
 
 This file is part of the GNU MP Library.


More information about the gmp-commit mailing list