[Gmp-commit] /home/hgfiles/gmp: 2 new changesets
mercurial at gmplib.org
mercurial at gmplib.org
Sat Dec 11 14:54:23 CET 2010
details: /home/hgfiles/gmp/rev/c82b5151cffb
changeset: 13701:c82b5151cffb
user: Torbjorn Granlund <tege at gmplib.org>
date: Sat Dec 11 10:51:53 2010 +0100
description:
Improve sparc configuration.
details: /home/hgfiles/gmp/rev/6fc76fbd5d94
changeset: 13702:6fc76fbd5d94
user: Torbjorn Granlund <tege at gmplib.org>
date: Sat Dec 11 11:42:24 2010 +0100
description:
Add mpn/sparc32/ultrasparct1 with basic set of files.
diffstat:
ChangeLog | 25 +++++++++++--
config.guess | 26 +++++++++----
config.sub | 2 +-
configure.in | 8 ++-
mpn/sparc32/ultrasparct1/add_n.asm | 59 +++++++++++++++++++++++++++++++
mpn/sparc32/ultrasparct1/addmul_1.asm | 52 +++++++++++++++++++++++++++
mpn/sparc32/ultrasparct1/mul_1.asm | 50 ++++++++++++++++++++++++++
mpn/sparc32/ultrasparct1/sqr_diagonal.asm | 44 +++++++++++++++++++++++
mpn/sparc32/ultrasparct1/sub_n.asm | 59 +++++++++++++++++++++++++++++++
mpn/sparc32/ultrasparct1/submul_1.asm | 52 +++++++++++++++++++++++++++
10 files changed, 361 insertions(+), 16 deletions(-)
diffs (truncated from 487 to 300 lines):
diff -r 6b83547c33b1 -r 6fc76fbd5d94 ChangeLog
--- a/ChangeLog Thu Dec 02 19:51:07 2010 +0100
+++ b/ChangeLog Sat Dec 11 11:42:24 2010 +0100
@@ -1,3 +1,20 @@
+2010-12-11 Torbjorn Granlund <tege at gmplib.org>
+
+ * mpn/sparc32/ultrasparct1: New directory.
+ * mpn/sparc32/ultrasparct1/add_n.asm: New file.
+ * mpn/sparc32/ultrasparct1/sub_n.asm: New file.
+ * mpn/sparc32/ultrasparct1/mul_1.asm: New file.
+ * mpn/sparc32/ultrasparct1/addmul_1.asm: New file.
+ * mpn/sparc32/ultrasparct1/submul_1.asm: New file.
+ * mpn/sparc32/ultrasparct1/sqr_diagonal.asm: New file.
+
+ * config.guess: Support Ultrasparc T2 and T3.
+ * config.sub: Likewise.
+ * configure.in: Likewise.
+
+ * config.guess: Generalise BSD Sparc recognition by allowing any
+ caps (needed for OpenBSD which spells things innovatively).
+
2010-12-01 Torbjorn Granlund <tege at gmplib.org>
* config.guess: Match new AMD processors, allow finer distinctions
@@ -2519,7 +2536,7 @@
* tune/Makefile.am (libspeed_la_SOURCES): Remove sb_div.c and sb_inv.c.
(TUNE_MPN_SRCS_BASIC): Remove sb_divrem_mn.c.
* tune/common.c (speed_mpn_dcpi1_div_qr_n): New function.
- Remove mpn_sb_divrem_mn related functions.
+ Remove mpn_sb_divrem_mn related functions.
* tune/speed.c (routine): Remove entries related to mpn_dc_divrem and
mpn_sb_divrem.
(routine): New entry for mpn_dc_div_qr_n.
@@ -20452,8 +20469,8 @@
* mpn/Makefile.am: Remove incorrect comment.
* mpn/Makefile.in: Regenerate.
- * gmp.h: Rename most of the random number functions, structs and
- some of the struct members.
+ * gmp.h: Rename most of the random number functions, structs and some
+ of the struct members.
* rand.c (gmp_randinit): Likewise.
* randclr.c (gmp_randclear): Likewise.
* randlc.c (gmp_randinit_lc): Likewise.
@@ -25801,7 +25818,7 @@
* mpz_do_sqrt: Simplify special case for U == 0.
* m*sqrt*.c, mpz_perfsqr.c (mpz_perfect_square_p):
- Rename _mpz_impl_sqrt to _mpz_do_sqrt.
+ Rename _mpz_impl_sqrt to _mpz_do_sqrt.
Fri Dec 13 12:52:28 1991 Torbjorn Granlund (tege at zevs.sics.se)
diff -r 6b83547c33b1 -r 6fc76fbd5d94 config.guess
--- a/config.guess Thu Dec 02 19:51:07 2010 +0100
+++ b/config.guess Sat Dec 11 11:42:24 2010 +0100
@@ -542,8 +542,11 @@
elif grep 'cpu.*MB86904' /proc/cpuinfo >/dev/null; then
# actually MicroSPARC-II
exact_cpu=microsparc
+ elif grep 'cpu.*UltraSparc T3' /proc/cpuinfo >/dev/null; then
+ exact_cpu="ultrasparct3"
+ elif grep 'cpu.*UltraSparc T2' /proc/cpuinfo >/dev/null; then
+ exact_cpu="ultrasparct2"
elif grep 'cpu.*UltraSparc T1' /proc/cpuinfo >/dev/null; then
- # this grep pattern has not been tested against any Linux
exact_cpu="ultrasparct1"
elif grep 'cpu.*UltraSparc III' /proc/cpuinfo >/dev/null; then
exact_cpu="ultrasparc3"
@@ -598,7 +601,11 @@
for prtconfopt in "" "-vp"; do
if test -z "$exact_cpu"; then
if $SHELL -c "/usr/sbin/prtconf $prtconfopt" 2>/dev/null >conftest.dat; then
- if grep 'SUNW,UltraSPARC-T1' conftest.dat >/dev/null; then
+ if grep 'SUNW,UltraSPARC-T3' conftest.dat >/dev/null; then
+ exact_cpu=ultrasparct3
+ elif grep 'SUNW,UltraSPARC-T2' conftest.dat >/dev/null; then
+ exact_cpu=ultrasparct2
+ elif grep 'SUNW,UltraSPARC-T1' conftest.dat >/dev/null; then
exact_cpu=ultrasparct1
elif grep 'SUNW,UltraSPARC-III' conftest.dat >/dev/null; then
exact_cpu=ultrasparc3
@@ -633,16 +640,19 @@
#
if test -z "$exact_cpu"; then
if $SHELL -c "/sbin/sysctl hw.model" 2>/dev/null >conftest.dat; then
- if grep 'UltraSparc-T1' conftest.dat >/dev/null; then
- # this grep pattern has not been tested against any BSD
+ if grep -i 'UltraSparc-T3' conftest.dat >/dev/null; then
+ exact_cpu=ultrasparct3
+ elif grep -i 'UltraSparc-T2' conftest.dat >/dev/null; then
+ exact_cpu=ultrasparct2
+ elif grep -i 'UltraSparc-T1' conftest.dat >/dev/null; then
exact_cpu=ultrasparct1
- elif grep 'UltraSparc-III' conftest.dat >/dev/null; then
+ elif grep -i 'UltraSparc-III' conftest.dat >/dev/null; then
exact_cpu=ultrasparc3
- elif grep 'UltraSparc-IIi' conftest.dat >/dev/null; then
+ elif grep -i 'UltraSparc-IIi' conftest.dat >/dev/null; then
exact_cpu=ultrasparc2i
- elif grep 'UltraSparc-II' conftest.dat >/dev/null; then
+ elif grep -i 'UltraSparc-II' conftest.dat >/dev/null; then
exact_cpu=ultrasparc2
- elif grep 'UltraSparc' conftest.dat >/dev/null; then
+ elif grep -i 'UltraSparc' conftest.dat >/dev/null; then
exact_cpu=ultrasparc
elif grep 'TMS390Z5.' conftest.dat >/dev/null; then
# TMS390Z50 and TMS390Z55
diff -r 6b83547c33b1 -r 6fc76fbd5d94 config.sub
--- a/config.sub Thu Dec 02 19:51:07 2010 +0100
+++ b/config.sub Sat Dec 11 11:42:24 2010 +0100
@@ -106,7 +106,7 @@
powerpc64)
test_cpu=powerpc ;;
sparcv8 | supersparc | microsparc | \
-ultrasparc | ultrasparc2 | ultrasparc2i | ultrasparc3 | ultrasparct1)
+ultrasparc | ultrasparc2 | ultrasparc2i | ultrasparc3 | ultrasparct[1234])
test_cpu=sparc ;;
sh2)
test_cpu=sh ;;
diff -r 6b83547c33b1 -r 6fc76fbd5d94 configure.in
--- a/configure.in Thu Dec 02 19:51:07 2010 +0100
+++ b/configure.in Sat Dec 11 11:42:24 2010 +0100
@@ -1129,8 +1129,10 @@
path="sparc32/v8 sparc32" ;;
supersparc)
path="sparc32/v8/supersparc sparc32/v8 sparc32" ;;
- sparc64 | sparcv9* | ultrasparc*)
+ [sparc64 | sparcv9* | ultrasparc | ultrasparc[234]*])
path="sparc32/v9 sparc32/v8 sparc32" ;;
+ [ultrasparct[123]])
+ path="sparc32/ultrasparct1 sparc32/v8 sparc32" ;;
*)
path="sparc32" ;;
esac
@@ -1246,9 +1248,9 @@
case $host_cpu in
ultrasparc | ultrasparc2 | ultrasparc2i)
path_64="sparc64/ultrasparc1234 sparc64" ;;
- ultrasparc3)
+ [ultrasparc[34]])
path_64="sparc64/ultrasparc34 sparc64/ultrasparc1234 sparc64" ;;
- ultrasparct1 | ultrasparct2)
+ [ultrasparct[123]])
path_64="sparc64/ultrasparct1 sparc64" ;;
*)
path_64="sparc64"
diff -r 6b83547c33b1 -r 6fc76fbd5d94 mpn/sparc32/ultrasparct1/add_n.asm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpn/sparc32/ultrasparct1/add_n.asm Sat Dec 11 11:42:24 2010 +0100
@@ -0,0 +1,59 @@
+dnl SPARC T1 32-bit mpn_add_n.
+
+dnl Copyright 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')
+
+C INPUT PARAMETERS
+define(`rp', %o0)
+define(`ap', %o1)
+define(`bp', %o2)
+define(`n', %o3)
+define(`cy', %o4)
+
+define(`i', %o3)
+
+MULFUNC_PROLOGUE(mpn_add_n mpn_add_nc)
+
+ASM_START()
+PROLOGUE(mpn_add_nc)
+ b L(ent)
+ srl cy, 0, cy C strip any bogus high bits
+EPILOGUE()
+
+PROLOGUE(mpn_add_n)
+ mov 0, cy
+L(ent): srl n, 0, n C strip any bogus high bits
+ sll n, 2, n
+ add ap, n, ap
+ add bp, n, bp
+ add rp, n, rp
+ neg n, i
+
+L(top): lduw [ap+i], %g1
+ lduw [bp+i], %g2
+ add %g1, %g2, %g3
+ add %g3, cy, %g3
+ stw %g3, [rp+i]
+ add i, 4, i
+ brnz i, L(top)
+ srlx %g3, 32, cy
+
+ retl
+ mov cy, %o0 C return value
+EPILOGUE()
diff -r 6b83547c33b1 -r 6fc76fbd5d94 mpn/sparc32/ultrasparct1/addmul_1.asm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpn/sparc32/ultrasparct1/addmul_1.asm Sat Dec 11 11:42:24 2010 +0100
@@ -0,0 +1,52 @@
+dnl SPARC T1 32-bit mpn_addmul_1.
+
+dnl Copyright 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')
+
+C cycles/limb
+C UltraSPARC T1: 27
+
+C INPUT PARAMETERS
+define(`rp', `%o0')
+define(`up', `%o1')
+define(`n', `%o2')
+define(`v0', `%o3')
+
+ASM_START()
+PROLOGUE(mpn_addmul_1)
+ mov 0, %g4
+ srl v0, 0, v0
+ srl n, 0, n
+ dec n C n--
+
+L(top): lduw [up+0], %g1
+ add up, 4, up C up++
+ mulx %g1, v0, %g3
+ lduw [rp+0], %g2
+ add %g2, %g3, %g3
+ add %g4, %g3, %g3
+ stw %g3, [rp+0]
+ add rp, 4, rp C rp++
+ srlx %g3, 32, %g4
+ brnz n, L(top)
+ dec n C n--
+
+ retl
+ mov %g4, %o0 C return value
+EPILOGUE()
diff -r 6b83547c33b1 -r 6fc76fbd5d94 mpn/sparc32/ultrasparct1/mul_1.asm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpn/sparc32/ultrasparct1/mul_1.asm Sat Dec 11 11:42:24 2010 +0100
@@ -0,0 +1,50 @@
+dnl SPARC T1 32-bit mpn_mul_1.
+
+dnl Copyright 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')
+
+C cycles/limb
+C UltraSPARC T1: 23
+
+C INPUT PARAMETERS
+define(`rp', `%o0')
+define(`up', `%o1')
+define(`n', `%o2')
+define(`v0', `%o3')
+
More information about the gmp-commit
mailing list