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

mercurial at gmplib.org mercurial at gmplib.org
Sat Mar 12 22:39:06 CET 2011


details:   /var/hg/gmp/rev/139e1dd88de3
changeset: 14051:139e1dd88de3
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Sat Mar 12 22:38:42 2011 +0100
description:
Accept/return values correctly also for 32-bit ABI.

details:   /var/hg/gmp/rev/5671fbcbf6c4
changeset: 14052:5671fbcbf6c4
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Sat Mar 12 22:38:49 2011 +0100
description:
*** empty log message ***

diffstat:

 ChangeLog                |   4 ++++
 mpn/powerpc64/lshift.asm |  11 ++++++++---
 mpn/powerpc64/rshift.asm |  11 ++++++++---
 3 files changed, 20 insertions(+), 6 deletions(-)

diffs (80 lines):

diff -r 41bced017ec3 -r 5671fbcbf6c4 ChangeLog
--- a/ChangeLog	Sat Mar 12 12:19:00 2011 +0100
+++ b/ChangeLog	Sat Mar 12 22:38:49 2011 +0100
@@ -4,6 +4,10 @@
 
 2011-03-12  Torbjorn Granlund  <tege at gmplib.org>
 
+	* mpn/powerpc64/rshift.asm: Accept/return values correctly also for
+	32-bit ABI.
+	* mpn/powerpc64/lshift.asm: Likewise.
+
 	* tune/powerpc.asm: Use powerpc syntax, not power syntax.
 
 	* tune/common.c (speed_udiv_qrnnd_preinv1, etc): Remove.
diff -r 41bced017ec3 -r 5671fbcbf6c4 mpn/powerpc64/lshift.asm
--- a/mpn/powerpc64/lshift.asm	Sat Mar 12 12:19:00 2011 +0100
+++ b/mpn/powerpc64/lshift.asm	Sat Mar 12 22:38:49 2011 +0100
@@ -1,6 +1,6 @@
 dnl  PowerPC-64 mpn_lshift -- rp[] = up[] << cnt
 
-dnl  Copyright 2003, 2005, 2010 Free Software Foundation, Inc.
+dnl  Copyright 2003, 2005, 2010, 2011 Free Software Foundation, Inc.
 
 dnl  This file is part of the GNU MP Library.
 
@@ -54,7 +54,9 @@
 	addi	r31, n, 3	C compute count...
 	ld	r10, -8(up)	C load 1st limb for b00...b11
 	srd	retval, r10, tnc
-	srdi	r31, r31, 2	C ...for ctr
+ifdef(`HAVE_ABI_mode32',
+`	rldicl	r31, r31, 62,34',	C ...branch count
+`	srdi	r31, r31, 2')	C ...for ctr
 	mtctr	r31		C copy count into ctr
 	beq	cr0, L(b00)
 	blt	cr6, L(b01)
@@ -185,6 +187,9 @@
 
 L(ret):	ld	r31, -8(r1)
 	ld	r30, -16(r1)
-	mr	r3, retval
+ifdef(`HAVE_ABI_mode32',
+`	srdi	r3, retval, 32
+	mr	r4, retval
+',`	mr	r3, retval')
 	blr
 EPILOGUE()
diff -r 41bced017ec3 -r 5671fbcbf6c4 mpn/powerpc64/rshift.asm
--- a/mpn/powerpc64/rshift.asm	Sat Mar 12 12:19:00 2011 +0100
+++ b/mpn/powerpc64/rshift.asm	Sat Mar 12 22:38:49 2011 +0100
@@ -1,6 +1,6 @@
 dnl  PowerPC-64 mpn_rshift -- rp[] = up[] >> cnt
 
-dnl  Copyright 2003, 2005, 2010 Free Software Foundation, Inc.
+dnl  Copyright 2003, 2005, 2010, 2011 Free Software Foundation, Inc.
 
 dnl  This file is part of the GNU MP Library.
 
@@ -54,7 +54,9 @@
 	addi	r31, n, 3	C compute count...
 	ld	r10, 0(up)	C load 1st limb for b00...b11
 	sld	retval, r10, tnc
-	srdi	r31, r31, 2	C ...for ctr
+ifdef(`HAVE_ABI_mode32',
+`	rldicl	r31, r31, 62,34',	C ...branch count
+`	srdi	r31, r31, 2')	C ...for ctr
 	mtctr	r31		C copy count into ctr
 	beq	cr0, L(b00)
 	blt	cr6, L(b01)
@@ -185,6 +187,9 @@
 
 L(ret):	ld	r31, -8(r1)
 	ld	r30, -16(r1)
-	mr	r3, retval
+ifdef(`HAVE_ABI_mode32',
+`	srdi	r3, retval, 32
+	mr	r4, retval
+',`	mr	r3, retval')
 	blr
 EPILOGUE()


More information about the gmp-commit mailing list