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

mercurial at gmplib.org mercurial at gmplib.org
Sun Nov 15 14:52:21 UTC 2020


details:   /var/hg/gmp/rev/706ee1aab1c6
changeset: 18148:706ee1aab1c6
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Sun Nov 15 15:36:57 2020 +0100
description:
configure.ac (fat_path): Add zn1 for CPUVEC; (path): Use x86/zn2 x86/zn1 for zen2 and zen.

details:   /var/hg/gmp/rev/13e6fb09c056
changeset: 18149:13e6fb09c056
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Sun Nov 15 15:37:29 2020 +0100
description:
mpn/x86/fat/fat.c: Add CPUVEC_SETUP_zn1 for zen

details:   /var/hg/gmp/rev/0d09dc1a292b
changeset: 18150:0d09dc1a292b
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Sun Nov 15 15:39:09 2020 +0100
description:
mpn/generic/mu_divappr_q.c: Remove unused exit condition;

details:   /var/hg/gmp/rev/7f9a2376d6a6
changeset: 18151:7f9a2376d6a6
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Sun Nov 15 15:39:24 2020 +0100
description:
ChangeLog

diffstat:

 ChangeLog                  |  7 ++++++-
 configure.ac               |  6 +++---
 mpn/generic/mu_divappr_q.c |  5 ++---
 mpn/x86/fat/fat.c          |  1 +
 4 files changed, 12 insertions(+), 7 deletions(-)

diffs (87 lines):

diff -r 9ae375700274 -r 7f9a2376d6a6 ChangeLog
--- a/ChangeLog	Sun Nov 15 15:05:06 2020 +0100
+++ b/ChangeLog	Sun Nov 15 15:39:24 2020 +0100
@@ -1,6 +1,6 @@
 2020-11-15 Marco Bodrato <bodrato at mail.dm.unipi.it>
 
-	* mpn/generic/mu_divappr_q.c: Transform while {} into do {} while;
+	* mpn/generic/mu_divappr_q.c: Remove unused exit condition;
 	* mpn/generic/mod_1_3.c: Use default in a switch;
 	* rand/randlc2x.c: Replace __GMPN_ADD with mpn_add;
 	* scanf/doscan.c: Mask ASSERT_CODE, to reduce warnings.
@@ -8,6 +8,11 @@
 	* tests/devel/primes.c: Correctly use n_cto_bit or n_fto_bit.
 	* primesieve.c: Differentiate n_to_bit into floor and ceil.
 
+	* configure.ac (fat_path): Add zn1 for CPUVEC;
+	(path): Use x86/zn2 x86/zn1 for zen2 and zen.
+	* mpn/x86/fat/fat.c: Add CPUVEC_SETUP_zn1 for zen.
+
+
 2020-11-10 Marco Bodrato <bodrato at mail.dm.unipi.it>
 
 	* configure.ac (fat_path): Add bd1, goldmont,silvermont for CPUVEC.
diff -r 9ae375700274 -r 7f9a2376d6a6 configure.ac
--- a/configure.ac	Sun Nov 15 15:05:06 2020 +0100
+++ b/configure.ac	Sun Nov 15 15:39:24 2020 +0100
@@ -1885,14 +1885,14 @@
       zen | zennoavx)
 	gcc_cflags_cpu="-mtune=znver1 -mtune=amdfam10 -mtune=k8"
 	gcc_cflags_arch="-march=znver1 -march=amdfam10 -march=k8"
-	path="x86/k7/mmx x86/k7 x86/mmx x86"
+	path="x86/zn1 x86/k7/mmx x86/k7 x86/mmx x86"
 	x86_have_mulx=yes
 	path_64="x86_64/zen x86_64"
 	;;
       zen2 | zen2noavx | zen3 | zen3noavx)
 	gcc_cflags_cpu="-mtune=znver2 -mtune=znver1 -mtune=amdfam10 -mtune=k8"
 	gcc_cflags_arch="-march=znver2 -march=znver1 -march=amdfam10 -march=k8"
-	path="x86/k7/mmx x86/k7 x86/mmx x86"
+	path="x86/zn2 x86/zn1 x86/k7/mmx x86/k7 x86/mmx x86"
 	x86_have_mulx=yes
 	path_64="x86_64/zen2 x86_64/zen x86_64"
 	;;
@@ -2291,7 +2291,7 @@
 	fat_path="x86 x86/fat x86/i486
 		  x86/k6 x86/k6/mmx x86/k6/k62mmx
 		  x86/k7 x86/k7/mmx
-		  x86/k8 x86/k10 x86/bt1 x86/bd1
+		  x86/k8 x86/k10 x86/bt1 x86/bd1 x86/zn1
 		  x86/pentium x86/pentium/mmx
 		  x86/p6 x86/p6/mmx x86/p6/p3mmx x86/p6/sse2
 		  x86/pentium4 x86/pentium4/mmx x86/pentium4/sse2
diff -r 9ae375700274 -r 7f9a2376d6a6 mpn/generic/mu_divappr_q.c
--- a/mpn/generic/mu_divappr_q.c	Sun Nov 15 15:05:06 2020 +0100
+++ b/mpn/generic/mu_divappr_q.c	Sun Nov 15 15:39:24 2020 +0100
@@ -188,10 +188,10 @@
   else
     MPN_COPY (rp, np, dn);
 
-  if (qn == 0)
+  if (UNLIKELY (qn == 0))
     return qh;			/* Degenerate use.  Should we allow this? */
 
-  do
+  while (1) /* The exit condition (qn == 0) is verified in the loop. */
     {
       if (qn < in)
 	{
@@ -283,7 +283,6 @@
 	      }
 	    );
     }
-  while (qn > 0);
 
   /* FIXME: We should perhaps be somewhat more elegant in our rounding of the
      quotient.  For now, just make sure the returned quotient is >= the real
diff -r 9ae375700274 -r 7f9a2376d6a6 mpn/x86/fat/fat.c
--- a/mpn/x86/fat/fat.c	Sun Nov 15 15:05:06 2020 +0100
+++ b/mpn/x86/fat/fat.c	Sun Nov 15 15:39:24 2020 +0100
@@ -485,6 +485,7 @@
 	      TRACE (printf ("  zen\n"));
 	      CPUVEC_SETUP_k7;
 	      CPUVEC_SETUP_k7_mmx;
+	      CPUVEC_SETUP_zn1;
 	      break;
             }
         }



More information about the gmp-commit mailing list