[Gmp-commit] /var/hg/gmp: For 32-bit mode, zero extend `n' argument and split...

mercurial at gmplib.org mercurial at gmplib.org
Mon Jun 17 23:08:14 CEST 2013


details:   /var/hg/gmp/rev/bb95c3d7691e
changeset: 15839:bb95c3d7691e
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Jun 17 23:08:05 2013 +0200
description:
For 32-bit mode, zero extend `n' argument and split retval.

diffstat:

 ChangeLog                    |   1 +
 mpn/powerpc64/p6/lshift.asm  |  14 +++++++++++++-
 mpn/powerpc64/p6/lshiftc.asm |  14 +++++++++++++-
 mpn/powerpc64/p6/rshift.asm  |  14 +++++++++++++-
 4 files changed, 40 insertions(+), 3 deletions(-)

diffs (140 lines):

diff -r f03822194825 -r bb95c3d7691e ChangeLog
--- a/ChangeLog	Mon Jun 17 13:35:03 2013 +0200
+++ b/ChangeLog	Mon Jun 17 23:08:05 2013 +0200
@@ -1,6 +1,7 @@
 2013-06-17  Torbjorn Granlund  <tege at gmplib.org>
 
 	* mpn/powerpc64/p6/lshift.asm: Fix typo in label reference.
+	For 32-bit mode, zero extend `n' argument and split retval.
 	* mpn/powerpc64/p6/rshift.asm: Likewise.
 	* mpn/powerpc64/p6/lshiftc.asm: Likewise.
 
diff -r f03822194825 -r bb95c3d7691e mpn/powerpc64/p6/lshift.asm
--- a/mpn/powerpc64/p6/lshift.asm	Mon Jun 17 13:35:03 2013 +0200
+++ b/mpn/powerpc64/p6/lshift.asm	Mon Jun 17 23:08:05 2013 +0200
@@ -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, 2013 Free Software Foundation, Inc.
 
 dnl  This file is part of the GNU MP Library.
 
@@ -42,6 +42,10 @@
 
 ASM_START()
 PROLOGUE(mpn_lshift)
+
+ifdef(`HAVE_ABI_mode32',`
+	rldicl	n, n, 0,32		C FIXME: avoid this zero extend
+')
 	mflr	r12
 	bcl	20, 31, L(r)		C get pc using a local "call"
 L(r):	mflr	r11
@@ -81,6 +85,10 @@
 	sld	r8, r9, cnt
 	std	r8, -8(rp)
 	mtlr	r12
+ifdef(`HAVE_ABI_mode32',
+`	mr	r4, r3
+	srdi	r3, r3, 32
+')
 	blr
 
 
@@ -108,5 +116,9 @@
 
 L(com):	std	r10, -16(rp)
 	mtlr	r12
+ifdef(`HAVE_ABI_mode32',
+`	mr	r4, r3
+	srdi	r3, r3, 32
+')
 	blr
 EPILOGUE()
diff -r f03822194825 -r bb95c3d7691e mpn/powerpc64/p6/lshiftc.asm
--- a/mpn/powerpc64/p6/lshiftc.asm	Mon Jun 17 13:35:03 2013 +0200
+++ b/mpn/powerpc64/p6/lshiftc.asm	Mon Jun 17 23:08:05 2013 +0200
@@ -1,6 +1,6 @@
 dnl  PowerPC-64 mpn_lshiftc -- rp[] = ~up[] << cnt
 
-dnl  Copyright 2003, 2005, 2010 Free Software Foundation, Inc.
+dnl  Copyright 2003, 2005, 2010, 2013 Free Software Foundation, Inc.
 
 dnl  This file is part of the GNU MP Library.
 
@@ -42,6 +42,10 @@
 
 ASM_START()
 PROLOGUE(mpn_lshiftc)
+
+ifdef(`HAVE_ABI_mode32',`
+	rldicl	n, n, 0,32		C FIXME: avoid this zero extend
+')
 	mflr	r12
 	bcl	20, 31, L(r)		C get pc using a local "call"
 L(r):	mflr	r11
@@ -82,6 +86,10 @@
 	nor	r8, r8, r8
 	std	r8, -8(rp)
 	mtlr	r12
+ifdef(`HAVE_ABI_mode32',
+`	mr	r4, r3
+	srdi	r3, r3, 32
+')
 	blr
 
 
@@ -112,5 +120,9 @@
 	std	r11, -8(rp)
 	std	r10, -16(rp)
 	mtlr	r12
+ifdef(`HAVE_ABI_mode32',
+`	mr	r4, r3
+	srdi	r3, r3, 32
+')
 	blr
 EPILOGUE()
diff -r f03822194825 -r bb95c3d7691e mpn/powerpc64/p6/rshift.asm
--- a/mpn/powerpc64/p6/rshift.asm	Mon Jun 17 13:35:03 2013 +0200
+++ b/mpn/powerpc64/p6/rshift.asm	Mon Jun 17 23:08:05 2013 +0200
@@ -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, 2013 Free Software Foundation, Inc.
 
 dnl  This file is part of the GNU MP Library.
 
@@ -42,6 +42,10 @@
 
 ASM_START()
 PROLOGUE(mpn_rshift)
+
+ifdef(`HAVE_ABI_mode32',`
+	rldicl	n, n, 0,32		C FIXME: avoid this zero extend
+')
 	mflr	r12
 	bcl	20, 31, L(r)		C get pc using a local "call"
 L(r):	mflr	r11
@@ -80,6 +84,10 @@
 	srd	r8, r9, cnt
 	std	r8, 0(rp)
 	mtlr	r12
+ifdef(`HAVE_ABI_mode32',
+`	mr	r4, r3
+	srdi	r3, r3, 32
+')
 	blr
 
 
@@ -107,5 +115,9 @@
 
 L(com):	std	r10, 8(rp)
 	mtlr	r12
+ifdef(`HAVE_ABI_mode32',
+`	mr	r4, r3
+	srdi	r3, r3, 32
+')
 	blr
 EPILOGUE()


More information about the gmp-commit mailing list