[Gmp-commit] /var/hg/gmp: 3 new changesets
mercurial at gmplib.org
mercurial at gmplib.org
Sun Oct 16 00:42:51 CEST 2011
details: /var/hg/gmp/rev/f93d3702dd51
changeset: 14337:f93d3702dd51
user: Torbjorn Granlund <tege at gmplib.org>
date: Sun Oct 16 00:24:01 2011 +0200
description:
New file.
details: /var/hg/gmp/rev/6b2909b3c36e
changeset: 14338:6b2909b3c36e
user: Torbjorn Granlund <tege at gmplib.org>
date: Sun Oct 16 00:25:06 2011 +0200
description:
New file.
details: /var/hg/gmp/rev/92d555288849
changeset: 14339:92d555288849
user: Torbjorn Granlund <tege at gmplib.org>
date: Sun Oct 16 00:30:53 2011 +0200
description:
*** empty log message ***
diffstat:
ChangeLog | 6 ++
mpn/s390_64/mod_34lsub1.asm | 100 +++++++++++++++++++++++++++++++++++++++
mpn/s390_64/sqr_diag_addlsh1.asm | 72 ++++++++++++++++++++++++++++
3 files changed, 178 insertions(+), 0 deletions(-)
diffs (193 lines):
diff -r c7f6201ababb -r 92d555288849 ChangeLog
--- a/ChangeLog Sat Oct 15 20:32:39 2011 +0200
+++ b/ChangeLog Sun Oct 16 00:30:53 2011 +0200
@@ -1,3 +1,9 @@
+2011-10-16 Torbjorn Granlund <tege at gmplib.org>
+
+ * mpn/s390_64/mod_34lsub1.asm: New file.
+
+ * mpn/s390_64/sqr_diag_addlsh1.asm: New file.
+
2011-10-15 Torbjorn Granlund <tege at gmplib.org>
* configure.in (s390): Rewrite support to handle known CPUs.
diff -r c7f6201ababb -r 92d555288849 mpn/s390_64/mod_34lsub1.asm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpn/s390_64/mod_34lsub1.asm Sun Oct 16 00:30:53 2011 +0200
@@ -0,0 +1,100 @@
+dnl S/390-64 mpn_addmul_1
+
+dnl Copyright 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 cycles/limb
+C z990 2
+
+C TODO
+C * Optimise summation code, see x86_64.
+
+C INPUT PARAMETERS
+define(`rp', `%r2')
+define(`n', `%r3')
+
+ASM_START()
+PROLOGUE(mpn_mod_34lsub1)
+ stmg %r7, %r13, 56(%r15)
+ larl %r13, .L12
+ lghi %r11, 0
+ lghi %r12, 0
+ lghi %r0, 0
+ lghi %r8, 0
+ lghi %r9, 0
+ lghi %r10, 0
+ lghi %r7, 0
+ aghi %r3, -3
+ jl .L3
+
+L(top): alg %r0, 0(%r2)
+ alcg %r12, 8(%r2)
+ alcg %r11, 16(%r2)
+ alcgr %r8, %r7
+ la %r2, 24(%r2)
+ aghi %r3, -3
+ jnl L(top)
+
+ lgr %r7, %r8
+ srlg %r1, %r11, 16
+ nihh %r7, 0 C 0xffffffffffff
+ agr %r7, %r1
+ srlg %r8, %r8, 48
+ agr %r7, %r8
+ sllg %r11, %r11, 32
+ nihh %r11, 0
+ agr %r7, %r11
+.L3:
+ cghi %r3, -3
+ je .L6
+ alg %r0, 0(%r2)
+ alcgr %r10, %r10
+ cghi %r3, -2
+ je .L6
+ alg %r12, 8(%r2)
+ alcgr %r9, %r9
+.L6:
+ srlg %r1, %r0, 48
+ nihh %r0, 0 C 0xffffffffffff
+ agr %r0, %r1
+ agr %r0, %r7
+ srlg %r1, %r12, 32
+ agr %r0, %r1
+ srlg %r1, %r10, 32
+ agr %r0, %r1
+ ng %r12, .L14-.L12(%r13)
+ srlg %r1, %r9, 16
+ sllg %r12, %r12, 16
+ ng %r10, .L14-.L12(%r13)
+ agr %r0, %r1
+ llill %r2, 65535
+ agr %r0, %r12
+ sllg %r10, %r10, 16
+ ngr %r2, %r9
+ agr %r0, %r10
+ sllg %r2, %r2, 32
+ agr %r2, %r0
+ lmg %r7, %r13, 56(%r15)
+ br %r14
+EPILOGUE()
+
+ RODATA
+ ALIGN(8)
+.L12:
+.L14: .quad 4294967295
diff -r c7f6201ababb -r 92d555288849 mpn/s390_64/sqr_diag_addlsh1.asm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpn/s390_64/sqr_diag_addlsh1.asm Sun Oct 16 00:30:53 2011 +0200
@@ -0,0 +1,72 @@
+dnl S/390-64 mpn_sqr_diag_addlsh1
+
+dnl Copyright 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 cycles/limb
+C z990 19
+
+C INPUT PARAMETERS
+define(`rp', `%r2')
+define(`tp', `%r3')
+define(`up', `%r4')
+define(`n', `%r5')
+
+ASM_START()
+PROLOGUE(mpn_sqr_diag_addlsh1)
+ stmg %r6, %r9, 48(%r15)
+
+ lg %r1, 0(up)
+ mlgr %r0, %r1
+ aghi n, -1
+ lg %r7, 0(tp)
+ srlg %r9, %r7, 63
+ sllg %r7, %r7, 1
+ lgr %r6, %r1
+ algr %r7, %r0
+ j L(mid)
+
+L(top): lmg %r6, %r7, 8(tp)
+ la tp, 16(tp)
+ srlg %r8, %r6, 63
+ sllg %r6, %r6, 1
+ la %r6, 0(%r6,%r9)
+ srlg %r9, %r7, 63
+ sllg %r7, %r7, 1
+ la %r7, 0(%r7,%r8)
+ alcgr %r6, %r1
+ alcgr %r7, %r0
+L(mid): stmg %r6, %r7, 0(rp)
+ la rp, 16(rp)
+ lg %r1, 8(up)
+ la up, 8(up)
+ mlgr %r0, %r1
+ brctg n, L(top)
+
+L(end): lg %r6, 8(tp)
+ srlg %r7, %r6, 63
+ sllg %r6, %r6, 1
+ la %r6, 0(%r6,%r9)
+ alcgr %r6, %r1
+ alcgr %r7, %r0
+ stmg %r6, %r7, 0(rp)
+
+ lmg %r6, %r9, 48(%r15)
+ br %r14
+EPILOGUE()
More information about the gmp-commit
mailing list