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

mercurial at gmplib.org mercurial at gmplib.org
Wed Apr 17 14:33:26 CEST 2013


details:   /var/hg/gmp/rev/a80d0d5f8b6f
changeset: 15727:a80d0d5f8b6f
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Wed Apr 17 14:18:28 2013 +0200
description:
Decrease loop alignment.

details:   /var/hg/gmp/rev/4a5b7abb1a3b
changeset: 15728:4a5b7abb1a3b
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Wed Apr 17 14:21:07 2013 +0200
description:
Remove "missing" from extra_functions_64 for coreibwl.

details:   /var/hg/gmp/rev/accec60ffa9f
changeset: 15729:accec60ffa9f
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Wed Apr 17 14:30:31 2013 +0200
description:
(add_mssaaaa): Provide VIS3 variant.

details:   /var/hg/gmp/rev/f00b33194300
changeset: 15730:f00b33194300
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Wed Apr 17 14:33:05 2013 +0200
description:
Rewrite to use Hensel division also for size = 1.

details:   /var/hg/gmp/rev/372402a98875
changeset: 15731:372402a98875
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Wed Apr 17 14:33:23 2013 +0200
description:
ChangeLog

diffstat:

 ChangeLog                             |  14 +++++++++++++-
 configure.ac                          |   2 +-
 mpn/generic/dive_1.c                  |  31 ++++++++++---------------------
 mpn/generic/mod_1_1.c                 |  13 ++++++++++++-
 mpn/sparc64/ultrasparct3/aormul_2.asm |   2 +-
 mpn/sparc64/ultrasparct3/mul_1.asm    |   2 +-
 6 files changed, 38 insertions(+), 26 deletions(-)

diffs (180 lines):

diff -r 144be7805798 -r 372402a98875 ChangeLog
--- a/ChangeLog	Wed Apr 17 11:20:04 2013 +0200
+++ b/ChangeLog	Wed Apr 17 14:33:23 2013 +0200
@@ -1,3 +1,15 @@
+2013-04-17  Torbjorn Granlund  <tege at gmplib.org>
+
+	* mpn/generic/dive_1.c: Rewrite to use Hensel division also for
+	size = 1.
+
+	* mpn/generic/mod_1_1.c (add_mssaaaa): Provide VIS3 variant.
+
+	* configure.ac: Remove "missing" from extra_functions_64 for coreibwl.
+
+	* mpn/sparc64/ultrasparct3/mul_1.asm: Decrease loop alignment.
+	* mpn/sparc64/ultrasparct3/aormul_2.asm: Likewise.
+
 2013-04-16  Torbjorn Granlund  <tege at gmplib.org>
 
 	* mpn/alpha/invert_limb.asm: Generate table.
@@ -361,7 +373,7 @@
 
 2013-03-12  Torbjorn Granlund  <tege at gmplib.org>
 
-	* configure.ac: Add "missing" to extra_functions for coreibwl.
+	* configure.ac: Add "missing" to extra_functions_64 for coreibwl.
 
 	* mpn/x86_64/mulx/adx/addmul_1.asm: Simplify.  Make FAKE_MULXADX the
 	default awaiting proper qemu behaviour.
diff -r 144be7805798 -r 372402a98875 configure.ac
--- a/configure.ac	Wed Apr 17 11:20:04 2013 +0200
+++ b/configure.ac	Wed Apr 17 14:33:23 2013 +0200
@@ -1699,7 +1699,7 @@
 	gcc_cflags_arch="-march=corei7 -march=core2 -march=core2~-mno-sse2 -march=k8 -march=k8~-mno-sse2"
 	path="x86/coreisbr x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86/mmx x86"
 	path_64="x86_64/mulx/adx x86_64/mulx x86_64/coreisbr x86_64/coreinhm x86_64/core2 x86_64"
-	extra_functions_64="missing"	     # FIXME: remove when qemu's adx flags handling works
+	# extra_functions_64="missing"	 # enable for bmi2/adx simulation
 	;;
       atom)
 	gcc_cflags_cpu="-mtune=atom -mtune=pentium3"
diff -r 144be7805798 -r 372402a98875 mpn/generic/dive_1.c
--- a/mpn/generic/dive_1.c	Wed Apr 17 11:20:04 2013 +0200
+++ b/mpn/generic/dive_1.c	Wed Apr 17 14:33:23 2013 +0200
@@ -4,7 +4,7 @@
    CERTAIN TO BE SUBJECT TO INCOMPATIBLE CHANGES OR DISAPPEAR COMPLETELY IN
    FUTURE GNU MP RELEASES.
 
-Copyright 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+Copyright 2000, 2001, 2002, 2003, 2005, 2013 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
@@ -76,14 +76,6 @@
   ASSERT_MPN (src, size);
   ASSERT_LIMB (divisor);
 
-  s = src[0];
-
-  if (size == 1)
-    {
-      dst[0] = s / divisor;
-      return;
-    }
-
   if ((divisor & 1) == 0)
     {
       count_trailing_zeros (shift, divisor);
@@ -98,40 +90,39 @@
   if (shift != 0)
     {
       c = 0;
-      i = 0;
-      size--;
 
-      do
+      s = src[0];
+
+      for (i = 1; i < size; i++)
 	{
-	  s_next = src[i+1];
+	  s_next = src[i];
 	  ls = ((s >> shift) | (s_next << (GMP_NUMB_BITS-shift))) & GMP_NUMB_MASK;
 	  s = s_next;
 
 	  SUBC_LIMB (c, l, ls, c);
 
 	  l = (l * inverse) & GMP_NUMB_MASK;
-	  dst[i] = l;
+	  dst[i - 1] = l;
 
 	  umul_ppmm (h, dummy, l, divisor);
 	  c += h;
-
-	  i++;
 	}
       while (i < size);
 
       ls = s >> shift;
       l = ls - c;
       l = (l * inverse) & GMP_NUMB_MASK;
-      dst[i] = l;
+      dst[size - 1] = l;
     }
   else
     {
+      s = src[0];
+
       l = (s * inverse) & GMP_NUMB_MASK;
       dst[0] = l;
-      i = 1;
       c = 0;
 
-      do
+      for (i = 1; i < size; i++)
 	{
 	  umul_ppmm (h, dummy, l, divisor);
 	  c += h;
@@ -141,8 +132,6 @@
 
 	  l = (l * inverse) & GMP_NUMB_MASK;
 	  dst[i] = l;
-	  i++;
 	}
-      while (i < size);
     }
 }
diff -r 144be7805798 -r 372402a98875 mpn/generic/mod_1_1.c
--- a/mpn/generic/mod_1_1.c	Wed Apr 17 11:20:04 2013 +0200
+++ b/mpn/generic/mod_1_1.c	Wed Apr 17 14:33:23 2013 +0200
@@ -8,7 +8,7 @@
    SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES.  IN FACT, IT IS ALMOST
    GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE.
 
-Copyright 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+Copyright 2008, 2009, 2010, 2011, 2013 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
@@ -80,6 +80,17 @@
 	   : "rJ" (ah), "rI" (bh), "%rJ" (al), "rI" (bl),		\
 	     "rJ" ((al) >> 32), "rI" ((bl) >> 32)			\
 	 __CLOBBER_CC)
+#if __VIS__ >= 0x300
+#undef add_mssaaaa
+#define add_mssaaaa(m, sh, sl, ah, al, bh, bl)				\
+  __asm__ (  "addcc	%r5, %6, %2\n\t"				\
+	     "addxccc	%r3, %4, %1\n\t"				\
+	     "clr	%0\n\t"						\
+	     "movcs	%%xcc, -1, %0"					\
+	   : "=r" (m), "=r" (sh), "=&r" (sl)				\
+	   : "rJ" (ah), "rI" (bh), "%rJ" (al), "rI" (bl)		\
+	 __CLOBBER_CC)
+#endif
 #endif
 
 #if HAVE_HOST_CPU_FAMILY_powerpc && !defined (_LONG_LONG_LIMB)
diff -r 144be7805798 -r 372402a98875 mpn/sparc64/ultrasparct3/aormul_2.asm
--- a/mpn/sparc64/ultrasparct3/aormul_2.asm	Wed Apr 17 11:20:04 2013 +0200
+++ b/mpn/sparc64/ultrasparct3/aormul_2.asm	Wed Apr 17 14:33:23 2013 +0200
@@ -139,7 +139,7 @@
 	b	L(lo0)
 	 mov	0, w3
 
-	ALIGN(32)			C cycle
+	ALIGN(16)			C cycle
 L(top):	mulx	%i4, v0, %l2		C 0->5
 	umulxhi(%i4, v0, %l6)		C 0->5
 	ldx	[up+0], %i5		C 1->6
diff -r 144be7805798 -r 372402a98875 mpn/sparc64/ultrasparct3/mul_1.asm
--- a/mpn/sparc64/ultrasparct3/mul_1.asm	Wed Apr 17 11:20:04 2013 +0200
+++ b/mpn/sparc64/ultrasparct3/mul_1.asm	Wed Apr 17 14:33:23 2013 +0200
@@ -119,7 +119,7 @@
 	b	L(lo0)
 	 nop
 
-	ALIGN(32)
+	ALIGN(16)
 L(top):	ldx	[up+0], %l3	C 0
 	addxccc(%i4, %o5, %i4)	C 0
 	mulx	%l1, v0, %o2	C 1


More information about the gmp-commit mailing list