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

mercurial at gmplib.org mercurial at gmplib.org
Mon Jun 17 13:39:34 CEST 2013


details:   /var/hg/gmp/rev/66b8f306c772
changeset: 15837:66b8f306c772
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Jun 17 13:28:55 2013 +0200
description:
Fix typo in label reference.

details:   /var/hg/gmp/rev/f03822194825
changeset: 15838:f03822194825
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Jun 17 13:35:03 2013 +0200
description:
Clarify mpn_neg docs.

diffstat:

 ChangeLog                    |  6 ++++++
 doc/gmp.texi                 |  4 +++-
 mpn/powerpc64/p6/lshift.asm  |  3 +--
 mpn/powerpc64/p6/lshiftc.asm |  2 +-
 mpn/powerpc64/p6/rshift.asm  |  2 +-
 5 files changed, 12 insertions(+), 5 deletions(-)

diffs (71 lines):

diff -r 8283f62f4eb6 -r f03822194825 ChangeLog
--- a/ChangeLog	Fri Jun 14 17:33:43 2013 +0200
+++ b/ChangeLog	Mon Jun 17 13:35:03 2013 +0200
@@ -1,3 +1,9 @@
+2013-06-17  Torbjorn Granlund  <tege at gmplib.org>
+
+	* mpn/powerpc64/p6/lshift.asm: Fix typo in label reference.
+	* mpn/powerpc64/p6/rshift.asm: Likewise.
+	* mpn/powerpc64/p6/lshiftc.asm: Likewise.
+
 2013-06-10  Torbjorn Granlund  <tege at gmplib.org>
 
 	* mpn/generic/mu_div_q.c: Remove obsolete comment.
diff -r 8283f62f4eb6 -r f03822194825 doc/gmp.texi
--- a/doc/gmp.texi	Fri Jun 14 17:33:43 2013 +0200
+++ b/doc/gmp.texi	Mon Jun 17 13:35:03 2013 +0200
@@ -5266,7 +5266,9 @@
 
 @deftypefun mp_limb_t mpn_neg (mp_limb_t *@var{rp}, const mp_limb_t *@var{sp}, mp_size_t @var{n})
 Perform the negation of @{@var{sp}, @var{n}@}, and write the result to
-@{@var{rp}, @var{n}@}.  Return carry-out.
+@{@var{rp}, @var{n}@}.  This is equivalent to calling @code{mpn_sub_n} with a
+ at var{n}-limb zero minuend and passing @{@var{sp}, @var{n}@} as subtrahend.
+Return borrow, either 0 or 1.
 @end deftypefun
 
 @deftypefun void mpn_mul_n (mp_limb_t *@var{rp}, const mp_limb_t *@var{s1p}, const mp_limb_t *@var{s2p}, mp_size_t @var{n})
diff -r 8283f62f4eb6 -r f03822194825 mpn/powerpc64/p6/lshift.asm
--- a/mpn/powerpc64/p6/lshift.asm	Fri Jun 14 17:33:43 2013 +0200
+++ b/mpn/powerpc64/p6/lshift.asm	Mon Jun 17 13:35:03 2013 +0200
@@ -27,7 +27,6 @@
 
 C TODO
 C  * Micro-optimise header code
-C  * Write analogous lshiftc.asm
 C  * Perhaps do 4-way unrolling, for 2.5 c/l on POWER6.  The code is 4248
 C    bytes, 4-way code would become about 50% larger.
 
@@ -48,7 +47,7 @@
 L(r):	mflr	r11
 	sldi	r0, n, 3
 	sldi	r10, cnt, 6		C multiply cnt by size of a SHIFT block
-	addi	r11, r11, L(e1)-Lr-64	C address of L(e1) label in SHIFT(1)
+	addi	r11, r11, L(e1)-L(r)-64	C address of L(e1) label in SHIFT(1)
 	add	up, up, r0		C make up point at end of up[]
 	add	r11, r11, r10		C address of L(oN) for N = cnt
 	add	rp, rp_param, r0	C make rp point at end of rp[]
diff -r 8283f62f4eb6 -r f03822194825 mpn/powerpc64/p6/lshiftc.asm
--- a/mpn/powerpc64/p6/lshiftc.asm	Fri Jun 14 17:33:43 2013 +0200
+++ b/mpn/powerpc64/p6/lshiftc.asm	Mon Jun 17 13:35:03 2013 +0200
@@ -47,7 +47,7 @@
 L(r):	mflr	r11
 	sldi	r0, n, 3
 	sldi	r10, cnt, 6		C multiply cnt by size of a SHIFT block
-	addi	r11, r11, L(e1)-Lr-64	C address of L(e1) label in SHIFT(1)
+	addi	r11, r11, L(e1)-L(r)-64	C address of L(e1) label in SHIFT(1)
 	add	up, up, r0		C make up point at end of up[]
 	add	r11, r11, r10		C address of L(oN) for N = cnt
 	add	rp, rp_param, r0	C make rp point at end of rp[]
diff -r 8283f62f4eb6 -r f03822194825 mpn/powerpc64/p6/rshift.asm
--- a/mpn/powerpc64/p6/rshift.asm	Fri Jun 14 17:33:43 2013 +0200
+++ b/mpn/powerpc64/p6/rshift.asm	Mon Jun 17 13:35:03 2013 +0200
@@ -45,7 +45,7 @@
 	mflr	r12
 	bcl	20, 31, L(r)		C get pc using a local "call"
 L(r):	mflr	r11
-	addi	r11, r11, L(e1)-Lr-64	C address of L(e1) label in SHIFT(1)
+	addi	r11, r11, L(e1)-L(r)-64	C address of L(e1) label in SHIFT(1)
 	sldi	r10, cnt, 6		C multiply cnt by size of a SHIFT block
 	add	r11, r11, r10		C address of L(oN) for N = cnt
 	mr	rp, rp_param


More information about the gmp-commit mailing list