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

mercurial at gmplib.org mercurial at gmplib.org
Mon Jul 1 17:43:32 CEST 2013


details:   /var/hg/gmp/rev/acf58c3056be
changeset: 15842:acf58c3056be
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Sat Jun 22 16:48:14 2013 +0200
description:
Provide ppc64 rsblsh1_n and rsblsh2_n through generalisation.

details:   /var/hg/gmp/rev/16817c1578bb
changeset: 15843:16817c1578bb
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Jun 27 22:46:38 2013 +0200
description:
Provide POWER7-specific aors_n.asm.

details:   /var/hg/gmp/rev/8f1305e37ed3
changeset: 15844:8f1305e37ed3
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Fri Jun 28 20:24:22 2013 +0200
description:
Add POWER7 addlshC, sublshC, rsblshC.

details:   /var/hg/gmp/rev/221d7af25ec4
changeset: 15845:221d7af25ec4
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Fri Jun 28 20:33:35 2013 +0200
description:
Use alias regname.

details:   /var/hg/gmp/rev/40f416eeea57
changeset: 15846:40f416eeea57
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Fri Jun 28 20:35:14 2013 +0200
description:
Add a cycle number.

details:   /var/hg/gmp/rev/5f4377a09dd0
changeset: 15847:5f4377a09dd0
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Fri Jun 28 20:36:22 2013 +0200
description:
Tabulate table.

details:   /var/hg/gmp/rev/3ce935710166
changeset: 15848:3ce935710166
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Fri Jun 28 20:36:37 2013 +0200
description:
ChangeLog

details:   /var/hg/gmp/rev/c47fa37230c2
changeset: 15849:c47fa37230c2
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Jul 01 17:39:07 2013 +0200
description:
Rewrite PPC64 rsh1add_n and rsh1sub_n and combine into one file.

details:   /var/hg/gmp/rev/eaaf5f31f9b4
changeset: 15850:eaaf5f31f9b4
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Jul 01 17:41:06 2013 +0200
description:
Comment out AC_PROG_F77.

details:   /var/hg/gmp/rev/95d920cf0cae
changeset: 15851:95d920cf0cae
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Jul 01 17:41:17 2013 +0200
description:
ChangeLog

details:   /var/hg/gmp/rev/19c4cb159493
changeset: 15852:19c4cb159493
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Jul 01 17:43:27 2013 +0200
description:
Trivial merge.

diffstat:

 ChangeLog                                 |   32 +++++
 configure.ac                              |    2 +-
 cxx/ismpf.cc                              |    2 +-
 cxx/osmpf.cc                              |    2 +-
 mpn/powerpc64/mode64/aorslsh1_n.asm       |   44 -------
 mpn/powerpc64/mode64/aorslsh2_n.asm       |   44 -------
 mpn/powerpc64/mode64/aorslshC_n.asm       |  156 --------------------------
 mpn/powerpc64/mode64/aorsmul_1.asm        |   14 +-
 mpn/powerpc64/mode64/aorsorrlsh1_n.asm    |   32 +++++
 mpn/powerpc64/mode64/aorsorrlsh2_n.asm    |   32 +++++
 mpn/powerpc64/mode64/aorsorrlshC_n.asm    |  176 ++++++++++++++++++++++++++++++
 mpn/powerpc64/mode64/cnd_aors_n.asm       |    2 +-
 mpn/powerpc64/mode64/p7/aors_n.asm        |  117 +++++++++++++++++++
 mpn/powerpc64/mode64/p7/aorsorrlsh1_n.asm |   32 +++++
 mpn/powerpc64/mode64/p7/aorsorrlsh2_n.asm |   32 +++++
 mpn/powerpc64/mode64/p7/aorsorrlshC_n.asm |  118 ++++++++++++++++++++
 mpn/powerpc64/mode64/rsh1add_n.asm        |  102 -----------------
 mpn/powerpc64/mode64/rsh1aors_n.asm       |  161 +++++++++++++++++++++++++++
 mpn/powerpc64/mode64/rsh1sub_n.asm        |  100 -----------------
 tests/cxx/t-locale.cc                     |    4 +-
 20 files changed, 745 insertions(+), 459 deletions(-)

diffs (truncated from 1330 to 300 lines):

diff -r 53d1f20e8169 -r 19c4cb159493 ChangeLog
--- a/ChangeLog	Wed Jun 19 17:25:56 2013 +0200
+++ b/ChangeLog	Mon Jul 01 17:43:27 2013 +0200
@@ -1,3 +1,35 @@
+2013-07-01  Torbjorn Granlund  <tege at gmplib.org>
+
+	* configure.ac: Comment out AC_PROG_F77.
+
+	* mpn/powerpc64/mode64/rsh1add_n.asm: Remove.
+	* mpn/powerpc64/mode64/rsh1sub_n.asm: Remove.
+	* mpn/powerpc64/mode64/rsh1aors_n.asm: New file, code not based on
+	removed files.
+
+2013-06-28  Marc Glisse  <marc.glisse at inria.fr>
+
+	* cxx/ismpf.cc: Use GMP_DECIMAL_POINT.
+	* cxx/osmpf.cc: Likewise.
+	* tests/cxx/t-locale.cc: Likewise.
+
+2013-06-28  Torbjorn Granlund  <tege at gmplib.org>
+
+	* mpn/powerpc64/mode64/p7/aorsorrlshC_n.asm: New file.
+	* mpn/powerpc64/mode64/p7/aorsorrlsh1_n.asm: New file.
+	* mpn/powerpc64/mode64/p7/aorsorrlsh2_n.asm: New file.
+
+	* mpn/powerpc64/mode64/aorsorrlshC_n.asm: Use alias regname.
+
+2013-06-27  Torbjorn Granlund  <tege at gmplib.org>
+
+	* mpn/powerpc64/mode64/p7/aors_n.asm: New file.
+
+2013-06-22  Torbjorn Granlund  <tege at gmplib.org>
+
+	* aorslshC_n.asm, aorslsh2_n.asm, aorslsh1_n.asm: Remove.
+	* aorsorrlshC_n.asm, aorsorrlsh1_n.asm, aorsorrlsh2_n.asm: New files.
+
 2013-06-19  Torbjorn Granlund  <tege at gmplib.org>
 
 	* mpn/powerpc64/p6/lshift.asm: Rewrite switching-into-loop code.
diff -r 53d1f20e8169 -r 19c4cb159493 configure.ac
--- a/configure.ac	Wed Jun 19 17:25:56 2013 +0200
+++ b/configure.ac	Mon Jul 01 17:43:27 2013 +0200
@@ -2547,7 +2547,7 @@
 # FIXME: Rumour has it libtool will one day provide a way for a configure.in
 # to say what it wants from among supported languages etc.
 #
-AC_PROVIDE([AC_PROG_F77])
+#AC_PROVIDE([AC_PROG_F77])
 
 AC_PROG_LIBTOOL
 
diff -r 53d1f20e8169 -r 19c4cb159493 cxx/ismpf.cc
--- a/cxx/ismpf.cc	Wed Jun 19 17:25:56 2013 +0200
+++ b/cxx/ismpf.cc	Mon Jul 01 17:43:27 2013 +0200
@@ -45,7 +45,7 @@
   bool ok = false;
 
   // C decimal point, as expected by mpf_set_str
-  const char *lconv_point = localeconv()->decimal_point;
+  const char *lconv_point = GMP_DECIMAL_POINT;
 
   // C++ decimal point
 #if HAVE_STD__LOCALE
diff -r 53d1f20e8169 -r 19c4cb159493 cxx/osmpf.cc
--- a/cxx/osmpf.cc	Wed Jun 19 17:25:56 2013 +0200
+++ b/cxx/osmpf.cc	Mon Jul 01 17:43:27 2013 +0200
@@ -47,7 +47,7 @@
   point[0] = use_facet< numpunct<char> >(o.getloc()).decimal_point();
   point[1] = '\0';
 #else
-  const char *point = localeconv()->decimal_point;
+  const char *point = GMP_DECIMAL_POINT;
 #endif
 
   GMP_ASPRINTF_T_INIT (d, &result);
diff -r 53d1f20e8169 -r 19c4cb159493 mpn/powerpc64/mode64/aorslsh1_n.asm
--- a/mpn/powerpc64/mode64/aorslsh1_n.asm	Wed Jun 19 17:25:56 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-dnl  PowerPC-64 mpn_addlsh1_n and mpn_sublsh1_n.
-
-dnl  Copyright 2003, 2005, 2009, 2010 Free Software Foundation, Inc.
-
-dnl  This file is part of the GNU MP Library.
-
-dnl  The GNU MP Library is free software; you can redistribute it and/or modify
-dnl  it under the terms of the GNU Lesser General Public License as published
-dnl  by the Free Software Foundation; either version 3 of the License, or (at
-dnl  your option) any later version.
-
-dnl  The GNU MP Library is distributed in the hope that it will be useful, but
-dnl  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-dnl  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-dnl  License for more details.
-
-dnl  You should have received a copy of the GNU Lesser General Public License
-dnl  along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.
-
-include(`../config.m4')
-
-
-define(LSH,		1)
-define(RSH,		63)
-
-ifdef(`OPERATION_addlsh1_n',`
-  define(ADDSUBC,	addc)
-  define(ADDSUBE,	adde)
-  define(INITCY,	`addic	$1, r1, 0')
-  define(RETVAL,	`addze	r3, $1')
-  define(func, mpn_addlsh1_n)
-')
-ifdef(`OPERATION_sublsh1_n',`
-  define(ADDSUBC,	subfc)
-  define(ADDSUBE,	subfe)
-  define(INITCY,	`addic	$1, r1, -1')
-  define(RETVAL,	`subfze	r3, $1
-			neg	r3, r3')
-  define(func, mpn_sublsh1_n)
-')
-
-MULFUNC_PROLOGUE(mpn_addlsh1_n mpn_sublsh1_n)
-
-include_mpn(`powerpc64/mode64/aorslshC_n.asm')
diff -r 53d1f20e8169 -r 19c4cb159493 mpn/powerpc64/mode64/aorslsh2_n.asm
--- a/mpn/powerpc64/mode64/aorslsh2_n.asm	Wed Jun 19 17:25:56 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-dnl  PowerPC-64 mpn_addlsh2_n and mpn_sublsh2_n.
-
-dnl  Copyright 2003, 2005, 2009, 2010 Free Software Foundation, Inc.
-
-dnl  This file is part of the GNU MP Library.
-
-dnl  The GNU MP Library is free software; you can redistribute it and/or modify
-dnl  it under the terms of the GNU Lesser General Public License as published
-dnl  by the Free Software Foundation; either version 3 of the License, or (at
-dnl  your option) any later version.
-
-dnl  The GNU MP Library is distributed in the hope that it will be useful, but
-dnl  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-dnl  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-dnl  License for more details.
-
-dnl  You should have received a copy of the GNU Lesser General Public License
-dnl  along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.
-
-include(`../config.m4')
-
-
-define(LSH,		2)
-define(RSH,		62)
-
-ifdef(`OPERATION_addlsh2_n',`
-  define(ADDSUBC,	addc)
-  define(ADDSUBE,	adde)
-  define(INITCY,	`addic	$1, r1, 0')
-  define(RETVAL,	`addze	r3, $1')
-  define(func, mpn_addlsh2_n)
-')
-ifdef(`OPERATION_sublsh2_n',`
-  define(ADDSUBC,	subfc)
-  define(ADDSUBE,	subfe)
-  define(INITCY,	`addic	$1, r1, -1')
-  define(RETVAL,	`subfze	r3, $1
-			neg	r3, r3')
-  define(func, mpn_sublsh2_n)
-')
-
-MULFUNC_PROLOGUE(mpn_addlsh2_n mpn_sublsh2_n)
-
-include_mpn(`powerpc64/mode64/aorslshC_n.asm')
diff -r 53d1f20e8169 -r 19c4cb159493 mpn/powerpc64/mode64/aorslshC_n.asm
--- a/mpn/powerpc64/mode64/aorslshC_n.asm	Wed Jun 19 17:25:56 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,156 +0,0 @@
-dnl  PowerPC-64 mpn_addlshC_n and mpn_sublshC_n, where C is a small constant.
-
-dnl  Copyright 2003, 2005, 2009, 2010 Free Software Foundation, Inc.
-
-dnl  This file is part of the GNU MP Library.
-
-dnl  The GNU MP Library is free software; you can redistribute it and/or modify
-dnl  it under the terms of the GNU Lesser General Public License as published
-dnl  by the Free Software Foundation; either version 3 of the License, or (at
-dnl  your option) any later version.
-
-dnl  The GNU MP Library is distributed in the hope that it will be useful, but
-dnl  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-dnl  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-dnl  License for more details.
-
-dnl  You should have received a copy of the GNU Lesser General Public License
-dnl  along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.
-
-C                  cycles/limb
-C POWER3/PPC630          1.83   (1.5 c/l should be possible)
-C POWER4/PPC970          3      (2.0 c/l should be possible)
-C POWER5                 3
-C POWER6              3.5-47
-C POWER7                 3
-
-C STATUS
-C  * Try combining upx+up, and vpx+vp.
-C  * The worst case 47 c/l for POWER6 happens if the 3rd operand for ldx is
-C    greater than the 2nd operand.  Yes, this addition is non-commutative wrt
-C    performance.
-
-C INPUT PARAMETERS
-define(`rp', `r3')
-define(`up', `r4')
-define(`vp', `r5')
-define(`n',  `r6')
-
-define(`rpx', `r6')
-define(`upx', `r7')
-define(`vpx', `r12')
-
-define(`s0', `r0')  define(`s1', `r9')
-define(`u0', `r8')
-define(`v0', `r10') define(`v1', `r11')
-
-
-ASM_START()
-PROLOGUE(func)
-	cmpldi	cr0, n, 13
-	bgt	L(big)
-
-	mtctr	n		C copy n in ctr
-	INITCY(	r0)		C clear cy
-
-	ld	v0, 0(vp)	C load v limb
-	ld	u0, 0(up)	C load u limb
-	addi	up, up, -8	C update up
-	addi	rp, rp, -8	C update rp
-	sldi	s1, v0, LSH
-	bdz	L(ex1)		C If done, skip loop
-
-	ALIGN(16)
-L(lo0):	ld	v1, 8(vp)	C load v limb
-	ADDSUBE	s1, s1, u0	C add limbs with cy, set cy
-	ldu	u0, 16(up)	C load u limb and update up
-	srdi	s0, v0, RSH	C shift down previous v limb
-	std	s1, 8(rp)	C store result limb
-	rldimi	s0, v1, LSH, 0	C left shift v limb and merge with prev v limb
-	bdz	L(ex0)		C decrement ctr and exit if done
-	ldu	v0, 16(vp)	C load v limb and update vp
-	ADDSUBE	s0, s0, u0	C add limbs with cy, set cy
-	ld	u0, 8(up)	C load u limb
-	srdi	s1, v1, RSH	C shift down previous v limb
-	stdu	s0, 16(rp)	C store result limb and update rp
-	rldimi	s1, v0, LSH, 0	C left shift v limb and merge with prev v limb
-	bdnz	L(lo0)		C decrement ctr and loop back
-
-L(ex1):	ADDSUBE	r7, s1, u0
-	std	r7, 8(rp)	C store last result limb
-	srdi	r0, v0, RSH
-	RETVAL(	r0)
-	blr
-L(ex0):	ADDSUBE	r7, s0, u0
-	std	r7, 16(rp)	C store last result limb
-	srdi	r0, v1, RSH
-	RETVAL(	r0)
-	blr
-
-
-L(big):	rldicl.	r0, n, 0,63	C r0 = n & 1, set cr0
-	addi	r6, n, -1	C ...for ctr
-	srdi	r6, r6, 1	C ...for ctr
-	mtctr	r6		C copy count into ctr
-	beq	cr0, L(b0)
-
-L(b1):	ld	v1, 0(vp)
-	ld	u0, 0(up)
-	sldi	s1, v1, LSH
-	srdi	s0, v1, RSH
-	ld	v0, 8(vp)
-	ADDSUBC	s1, s1, u0	C add limbs without cy, set cy
-	addi	rpx, rp, -16
-	addi	rp, rp, -8
-	sub	upx, up, rp
-	sub	vpx, vp, rp
-	sub	up, up, rpx
-	sub	vp, vp, rpx
-	addi	up, up, 8
-	addi	upx, upx, 16
-	addi	vp, vp, 16
-	addi	vpx, vpx, 24
-	b	L(mid)
-
-L(b0):	ld	v0, 0(vp)
-	ld	u0, 0(up)
-	sldi	s0, v0, LSH
-	srdi	s1, v0, RSH
-	ld	v1, 8(vp)
-	ADDSUBC	s0, s0, u0	C add limbs without cy, set cy
-	addi	rpx, rp, -8
-	addi	rp, rp, -16
-	sub	upx, up, rpx
-	sub	vpx, vp, rpx
-	sub	up, up, rp


More information about the gmp-commit mailing list