[Gmp-commit] /var/hg/gmp: 3 new changesets
mercurial at gmplib.org
mercurial at gmplib.org
Sun Sep 25 23:20:53 CEST 2011
details: /var/hg/gmp/rev/cd3102c42a89
changeset: 14239:cd3102c42a89
user: Torbjorn Granlund <tege at gmplib.org>
date: Sun Sep 25 23:17:35 2011 +0200
description:
Migrate sh files to '.asm'.
details: /var/hg/gmp/rev/ff48acc30522
changeset: 14240:ff48acc30522
user: Torbjorn Granlund <tege at gmplib.org>
date: Sun Sep 25 23:20:15 2011 +0200
description:
Recognise sh3 and sh4.
details: /var/hg/gmp/rev/f56a4087c6cd
changeset: 14241:f56a4087c6cd
user: Torbjorn Granlund <tege at gmplib.org>
date: Sun Sep 25 23:20:31 2011 +0200
description:
*** empty log message ***
diffstat:
ChangeLog | 5 ++++
configure.in | 2 +-
mpn/sh/add_n.asm | 48 +++++++++++++++++++++++++++++++++++++++++++
mpn/sh/add_n.s | 45 ----------------------------------------
mpn/sh/sh2/addmul_1.asm | 54 +++++++++++++++++++++++++++++++++++++++++++++++++
mpn/sh/sh2/addmul_1.s | 51 ----------------------------------------------
mpn/sh/sh2/mul_1.asm | 51 ++++++++++++++++++++++++++++++++++++++++++++++
mpn/sh/sh2/mul_1.s | 48 -------------------------------------------
mpn/sh/sh2/submul_1.asm | 54 +++++++++++++++++++++++++++++++++++++++++++++++++
mpn/sh/sh2/submul_1.s | 51 ----------------------------------------------
mpn/sh/sub_n.asm | 48 +++++++++++++++++++++++++++++++++++++++++++
mpn/sh/sub_n.s | 45 ----------------------------------------
12 files changed, 261 insertions(+), 241 deletions(-)
diffs (truncated from 559 to 300 lines):
diff -r 02b32281da81 -r f56a4087c6cd ChangeLog
--- a/ChangeLog Wed Sep 21 15:05:45 2011 +0200
+++ b/ChangeLog Sun Sep 25 23:20:31 2011 +0200
@@ -1,3 +1,8 @@
+2011-09-25 Torbjorn Granlund <tege at gmplib.org>
+
+ * mpn/sh: Migrate files to '.asm'.
+ * configure.in: Recognise sh3 and sh4.
+
2011-09-21 Marc Glisse <marc.glisse at inria.fr>
* gmpxx.h (mpz_class::swap): New function.
diff -r 02b32281da81 -r f56a4087c6cd configure.in
--- a/configure.in Wed Sep 21 15:05:45 2011 +0200
+++ b/configure.in Sun Sep 25 23:20:31 2011 +0200
@@ -1123,7 +1123,7 @@
sh-*-*) path="sh" ;;
- sh2-*-*) path="sh/sh2 sh" ;;
+ [sh[2-4]-*-*]) path="sh/sh2 sh" ;;
*sparc*-*-*)
diff -r 02b32281da81 -r f56a4087c6cd mpn/sh/add_n.asm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpn/sh/add_n.asm Sun Sep 25 23:20:31 2011 +0200
@@ -0,0 +1,48 @@
+dnl SH mpn_add_n -- Add two limb vectors of the same length > 0 and store sum
+dnl in a third limb vector.
+
+dnl Copyright 1995, 1997, 2000, 2011 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
+C rp r4
+C up r5
+C vp r6
+C n r7
+
+changecom(blah) C disable # to make C all comments below work
+
+ASM_START()
+PROLOGUE(mpn_add_n)
+ mov #0,r3 C clear cy save reg
+
+L(top): mov.l @r5+,r1
+ mov.l @r6+,r2
+ shlr r3 C restore cy
+ addc r2,r1
+ movt r3 C save cy
+ mov.l r1, at r4
+ dt r7
+ bf.s L(top)
+ add #4,r4
+
+ rts
+ mov r3,r0 C return carry-out from most significant limb
+EPILOGUE()
diff -r 02b32281da81 -r f56a4087c6cd mpn/sh/add_n.s
--- a/mpn/sh/add_n.s Wed Sep 21 15:05:45 2011 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-! SH __gmpn_add_n -- Add two limb vectors of the same length > 0 and store
-! sum in a third limb vector.
-
-! Copyright 1995, 1997, 2000 Free Software Foundation, Inc.
-
-! This file is part of the GNU MP Library.
-
-! The GNU MP Library is free software; you can redistribute it and/or modify
-! it under the terms of the GNU Lesser General Public License as published by
-! the Free Software Foundation; either version 3 of the License, or (at your
-! option) any later version.
-
-! The GNU MP Library is distributed in the hope that it will be useful, but
-! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
-! License for more details.
-
-! You should have received a copy of the GNU Lesser General Public License
-! along with the GNU MP Library. If not, see http://www.gnu.org/licenses/.
-
-
-! INPUT PARAMETERS
-! res_ptr r4
-! s1_ptr r5
-! s2_ptr r6
-! size r7
-
- .text
- .align 2
- .global ___gmpn_add_n
-___gmpn_add_n:
- mov #0,r3 ! clear cy save reg
-
-Loop: mov.l @r5+,r1
- mov.l @r6+,r2
- shlr r3 ! restore cy
- addc r2,r1
- movt r3 ! save cy
- mov.l r1, at r4
- dt r7
- bf.s Loop
- add #4,r4
-
- rts
- mov r3,r0 ! return carry-out from most sign. limb
diff -r 02b32281da81 -r f56a4087c6cd mpn/sh/sh2/addmul_1.asm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpn/sh/sh2/addmul_1.asm Sun Sep 25 23:20:31 2011 +0200
@@ -0,0 +1,54 @@
+dnl SH2 mpn_addmul_1 -- Multiply a limb vector with a limb and add the result
+dnl to a second limb vector.
+
+dnl Copyright 1995, 2000, 2011 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
+C res_ptr r4
+C s1_ptr r5
+C size r6
+C s2_limb r7
+
+changecom(blah) C disable # to make C all comments below work
+
+ASM_START()
+PROLOGUE(mpn_addmul_1)
+ mov #0,r2 C cy_limb = 0
+ mov #0,r0 C Keep r0 = 0 for entire loop
+ clrt
+
+L(top): mov.l @r5+,r3
+ dmulu.l r3,r7
+ sts macl,r1
+ addc r2,r1 C lo_prod += old cy_limb
+ sts mach,r2 C new cy_limb = hi_prod
+ mov.l @r4,r3
+ addc r0,r2 C cy_limb += T, T = 0
+ addc r3,r1
+ addc r0,r2 C cy_limb += T, T = 0
+ dt r6
+ mov.l r1, at r4
+ bf.s L(top)
+ add #4,r4
+
+ rts
+ mov r2,r0
+EPILOGUE()
diff -r 02b32281da81 -r f56a4087c6cd mpn/sh/sh2/addmul_1.s
--- a/mpn/sh/sh2/addmul_1.s Wed Sep 21 15:05:45 2011 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-! SH2 __gmpn_addmul_1 -- Multiply a limb vector with a limb and add
-! the result to a second limb vector.
-
-! Copyright 1995, 2000 Free Software Foundation, Inc.
-
-! This file is part of the GNU MP Library.
-
-! The GNU MP Library is free software; you can redistribute it and/or modify
-! it under the terms of the GNU Lesser General Public License as published by
-! the Free Software Foundation; either version 3 of the License, or (at your
-! option) any later version.
-
-! The GNU MP Library is distributed in the hope that it will be useful, but
-! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
-! License for more details.
-
-! You should have received a copy of the GNU Lesser General Public License
-! along with the GNU MP Library. If not, see http://www.gnu.org/licenses/.
-
-
-! INPUT PARAMETERS
-! res_ptr r4
-! s1_ptr r5
-! size r6
-! s2_limb r7
-
- .text
- .align 1
- .global ___gmpn_addmul_1
-___gmpn_addmul_1:
- mov #0,r2 ! cy_limb = 0
- mov #0,r0 ! Keep r0 = 0 for entire loop
- clrt
-
-Loop: mov.l @r5+,r3
- dmulu.l r3,r7
- sts macl,r1
- addc r2,r1 ! lo_prod += old cy_limb
- sts mach,r2 ! new cy_limb = hi_prod
- mov.l @r4,r3
- addc r0,r2 ! cy_limb += T, T = 0
- addc r3,r1
- addc r0,r2 ! cy_limb += T, T = 0
- dt r6
- mov.l r1, at r4
- bf.s Loop
- add #4,r4
-
- rts
- mov r2,r0
diff -r 02b32281da81 -r f56a4087c6cd mpn/sh/sh2/mul_1.asm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpn/sh/sh2/mul_1.asm Sun Sep 25 23:20:31 2011 +0200
@@ -0,0 +1,51 @@
+dnl SH2 mpn_mul_1 -- Multiply a limb vector with a limb and store the result
+dnl in a second limb vector.
+
+dnl Copyright 1995, 2000, 2011 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
+C res_ptr r4
+C s1_ptr r5
+C size r6
+C s2_limb r7
+
+changecom(blah) C disable # to make C all comments below work
+
+ASM_START()
+PROLOGUE(mpn_mul_1)
+ mov #0,r2 C cy_limb = 0
+ mov #0,r0 C Keep r0 = 0 for entire loop
+ clrt
+
+L(top): mov.l @r5+,r3
+ dmulu.l r3,r7
+ sts macl,r1
+ addc r2,r1
+ sts mach,r2
+ addc r0,r2 C propagate carry to cy_limb (dt clobbers T)
+ dt r6
+ mov.l r1, at r4
+ bf.s L(top)
+ add #4,r4
+
+ rts
+ mov r2,r0
+EPILOGUE()
diff -r 02b32281da81 -r f56a4087c6cd mpn/sh/sh2/mul_1.s
--- a/mpn/sh/sh2/mul_1.s Wed Sep 21 15:05:45 2011 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-! SH2 __gmpn_mul_1 -- Multiply a limb vector with a limb and store
-! the result in a second limb vector.
-
More information about the gmp-commit
mailing list