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

mercurial at gmplib.org mercurial at gmplib.org
Wed Jul 26 14:31:15 CEST 2023


details:   /var/hg/gmp/rev/bd0839d8cbb5
changeset: 18400:bd0839d8cbb5
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Wed Jul 26 14:29:23 2023 +0200
description:
Provide z13 submul_1.  Minor misc z13 edits.

details:   /var/hg/gmp/rev/58c127581142
changeset: 18401:58c127581142
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Wed Jul 26 14:29:45 2023 +0200
description:
Provide z13 popcount and hamdist.

details:   /var/hg/gmp/rev/ce3fcd438c6b
changeset: 18402:ce3fcd438c6b
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Wed Jul 26 14:31:07 2023 +0200
description:
ChangeLog

diffstat:

 ChangeLog                    |   16 ++++++
 mpn/s390_64/z13/addmul_1.asm |    9 +-
 mpn/s390_64/z13/addmul_2.asm |    2 +-
 mpn/s390_64/z13/hamdist.asm  |   76 ++++++++++++++++++++++++++++++
 mpn/s390_64/z13/mul_1.asm    |    8 +-
 mpn/s390_64/z13/mul_2.asm    |    2 +-
 mpn/s390_64/z13/popcount.asm |   69 +++++++++++++++++++++++++++
 mpn/s390_64/z13/submul_1.asm |  108 +++++++++++++++++++++++++++++++++++++++++++
 8 files changed, 279 insertions(+), 11 deletions(-)

diffs (truncated from 375 to 300 lines):

diff -r 55fa199cf6c6 -r ce3fcd438c6b ChangeLog
--- a/ChangeLog	Tue Jul 25 17:47:35 2023 +0200
+++ b/ChangeLog	Wed Jul 26 14:31:07 2023 +0200
@@ -1,3 +1,19 @@
+2023-07-26  Torbjörn Granlund  <tg at gmplib.org>
+
+	* mpn/s390_64/z13/submul_1.asm: New file.
+	* mpn/s390_64/z13/popcount.asm: New file.
+	* mpn/s390_64/z13/hamdist.asm: New file.
+
+2023-07-25  Torbjörn Granlund  <tg at gmplib.org>
+
+	* mpn/s390_64/z13/addmul_2.asm: New file.
+	* mpn/s390_64/z13/addmul_1.asm: New file.
+	* mpn/s390_64/z13/addmul_2.asm: New file.
+	* mpn/s390_64/z13/mul_1.asm: New file.
+	* mpn/s390_64/z13/mul_2.asm: New file.
+	* mpn/s390_64/z13/mul_basecase.asm: New file.
+	* mpn/s390_64/z13/sqr_basecase.c: New file.
+
 2023-07-20  Torbjörn Granlund  <tg at gmplib.org>
 
 	* config.guess: Generalise sparc patterns.
diff -r 55fa199cf6c6 -r ce3fcd438c6b mpn/s390_64/z13/addmul_1.asm
--- a/mpn/s390_64/z13/addmul_1.asm	Tue Jul 25 17:47:35 2023 +0200
+++ b/mpn/s390_64/z13/addmul_1.asm	Wed Jul 26 14:31:07 2023 +0200
@@ -1,6 +1,6 @@
-dnl  S/390-64 mpn_addmul_1
+dnl  S/390-64 mpn_addmul_1 and mpn_addmul_1c.
 
-dnl  Copyright 2021 Free Software Foundation, Inc.
+dnl  Copyright 2023 Free Software Foundation, Inc.
 
 dnl  This file is part of the GNU MP Library.
 dnl
@@ -106,11 +106,11 @@
 	vlvgp	%v23, %r0, %r1		C W1 W0
 	vlvgp	%v21, %r7, %r9		C W1 W0
 	vacq	%v24, %v23, %v21, %v29	C
-	vacccq	%v29, %v23, %v21, %v29	C	carry critical path 3
+	vacccq	%v29, %v23, %v21, %v29	C	carry critical path 1
 	vl	%v16, 0(idx, rp)
 	vpdi	%v16, %v16, %v16, 4
 	vacq	%v20, %v24, %v16, %v30	C
-	vacccq	%v30, %v24, %v16, %v30	C	carry critical path 4
+	vacccq	%v30, %v24, %v16, %v30	C	carry critical path 2
 	vpdi	%v20, %v20, %v20, 4
 	vst	%v20, 0(idx, rp)
 	la	idx, 16(idx)
@@ -119,7 +119,6 @@
 L(end):	vag	%v29, %v29, %v30
 	vlgvg	%r2, %v29, 1
 	algr	%r2, %r6
-
 	lmg	%r6, %r9, 48(%r15)
 	br	%r14
 L(1):	lgr	%r2, %r6
diff -r 55fa199cf6c6 -r ce3fcd438c6b mpn/s390_64/z13/addmul_2.asm
--- a/mpn/s390_64/z13/addmul_2.asm	Tue Jul 25 17:47:35 2023 +0200
+++ b/mpn/s390_64/z13/addmul_2.asm	Wed Jul 26 14:31:07 2023 +0200
@@ -1,6 +1,6 @@
 dnl  S/390-64 mpn_addmul_2
 
-dnl  Copyright 2021 Free Software Foundation, Inc.
+dnl  Copyright 2023 Free Software Foundation, Inc.
 
 dnl  This file is part of the GNU MP Library.
 dnl
diff -r 55fa199cf6c6 -r ce3fcd438c6b mpn/s390_64/z13/hamdist.asm
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mpn/s390_64/z13/hamdist.asm	Wed Jul 26 14:31:07 2023 +0200
@@ -0,0 +1,76 @@
+dnl  S/390-64 mpn_hamdist
+
+dnl  Copyright 2023 Free Software Foundation, Inc.
+
+dnl  This file is part of the GNU MP Library.
+dnl
+dnl  The GNU MP Library is free software; you can redistribute it and/or modify
+dnl  it under the terms of either:
+dnl
+dnl    * the GNU Lesser General Public License as published by the Free
+dnl      Software Foundation; either version 3 of the License, or (at your
+dnl      option) any later version.
+dnl
+dnl  or
+dnl
+dnl    * the GNU General Public License as published by the Free Software
+dnl      Foundation; either version 2 of the License, or (at your option) any
+dnl      later version.
+dnl
+dnl  or both in parallel, as here.
+dnl
+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 General Public License
+dnl  for more details.
+dnl
+dnl  You should have received copies of the GNU General Public License and the
+dnl  GNU Lesser General Public License along with the GNU MP Library.  If not,
+dnl  see https://www.gnu.org/licenses/.
+
+include(`../config.m4')
+
+C            cycles/limb
+C z900		 -
+C z990		 -
+C z9		 -
+C z10		 -
+C z196		 -
+C z12		 ?
+C z13		 ?
+C z14		 ?
+C z15		 ?
+
+define(`ap',	`%r2')
+define(`bp',	`%r3')
+define(`n',	`%r4')
+
+ASM_START()
+PROLOGUE(mpn_hamdist)
+	vzero	%v30
+	tmll	n, 1
+	srlg	n, n, 1
+	je	L(top)
+
+L(odd):	vllezg	%v16, 0(ap)
+	vllezg	%v17, 0(bp)
+	vx	%v16, %v16, %v17
+	vpopctg	%v30, %v16
+	la	ap, 8(ap)
+	la	bp, 8(bp)
+	clgije	n, 0, L(end)
+
+L(top):	vl	%v16, 0(ap), 3
+	vl	%v17, 0(bp), 3
+	vx	%v16, %v16, %v17
+	vpopctg	%v20, %v16
+	vag	%v30, %v30, %v20
+	la	ap, 16(ap)
+	la	bp, 16(bp)
+	brctg	n, L(top)
+
+L(end):	vzero	%v29
+	vsumqg	%v30, %v30, %v29
+	vlgvg	%r2, %v30, 1(%r0)
+	br	%r14
+EPILOGUE()
diff -r 55fa199cf6c6 -r ce3fcd438c6b mpn/s390_64/z13/mul_1.asm
--- a/mpn/s390_64/z13/mul_1.asm	Tue Jul 25 17:47:35 2023 +0200
+++ b/mpn/s390_64/z13/mul_1.asm	Wed Jul 26 14:31:07 2023 +0200
@@ -1,6 +1,6 @@
-dnl  S/390-64 mpn_mul_1
+dnl  S/390-64 mpn_mul_1 and mpn_mul_1c.
 
-dnl  Copyright 2021 Free Software Foundation, Inc.
+dnl  Copyright 2023 Free Software Foundation, Inc.
 
 dnl  This file is part of the GNU MP Library.
 dnl
@@ -91,8 +91,8 @@
 	j	L(lst)
 L(evn):	lghi	%r6, 0
 	lghi	idx, 0
+
 L(lst):	vzero	%v29
-
 L(top):	lgr	%r9, %r6
 	lg	%r1, 0(idx, up)
 	lg	%r7, 8(idx, up)
@@ -101,7 +101,7 @@
 	vlvgp	%v23, %r0, %r1		C W1 W0
 	vlvgp	%v21, %r7, %r9		C W1 W0
 	vacq	%v20, %v23, %v21, %v29	C
-	vacccq	%v29, %v23, %v21, %v29	C	carry critical path 3
+	vacccq	%v29, %v23, %v21, %v29	C	carry critical path
 	vpdi	%v20, %v20, %v20, 4
 	vst	%v20, 0(idx, rp)
 	la	idx, 16(idx)
diff -r 55fa199cf6c6 -r ce3fcd438c6b mpn/s390_64/z13/mul_2.asm
--- a/mpn/s390_64/z13/mul_2.asm	Tue Jul 25 17:47:35 2023 +0200
+++ b/mpn/s390_64/z13/mul_2.asm	Wed Jul 26 14:31:07 2023 +0200
@@ -1,6 +1,6 @@
 dnl  S/390-64 mpn_mul_2
 
-dnl  Copyright 2021 Free Software Foundation, Inc.
+dnl  Copyright 2023 Free Software Foundation, Inc.
 
 dnl  This file is part of the GNU MP Library.
 dnl
diff -r 55fa199cf6c6 -r ce3fcd438c6b mpn/s390_64/z13/popcount.asm
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mpn/s390_64/z13/popcount.asm	Wed Jul 26 14:31:07 2023 +0200
@@ -0,0 +1,69 @@
+dnl  S/390-64 mpn_popcount
+
+dnl  Copyright 2023 Free Software Foundation, Inc.
+
+dnl  This file is part of the GNU MP Library.
+dnl
+dnl  The GNU MP Library is free software; you can redistribute it and/or modify
+dnl  it under the terms of either:
+dnl
+dnl    * the GNU Lesser General Public License as published by the Free
+dnl      Software Foundation; either version 3 of the License, or (at your
+dnl      option) any later version.
+dnl
+dnl  or
+dnl
+dnl    * the GNU General Public License as published by the Free Software
+dnl      Foundation; either version 2 of the License, or (at your option) any
+dnl      later version.
+dnl
+dnl  or both in parallel, as here.
+dnl
+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 General Public License
+dnl  for more details.
+dnl
+dnl  You should have received copies of the GNU General Public License and the
+dnl  GNU Lesser General Public License along with the GNU MP Library.  If not,
+dnl  see https://www.gnu.org/licenses/.
+
+include(`../config.m4')
+
+C            cycles/limb
+C z900		 -
+C z990		 -
+C z9		 -
+C z10		 -
+C z196		 -
+C z12		 ?
+C z13		 ?
+C z14		 ?
+C z15		 ?
+
+define(`ap',	`%r2')
+define(`n',	`%r3')
+
+ASM_START()
+PROLOGUE(mpn_popcount)
+	vzero	%v30
+	tmll	n, 1
+	srlg	n, n, 1
+	je	L(top)
+
+L(odd):	vllezg	%v16, 0(ap)
+	vpopctg	%v30, %v16
+	la	ap, 8(ap)
+	clgije	n, 0, L(end)
+
+L(top):	vl	%v16, 0(ap), 3
+	vpopctg	%v20, %v16
+	vag	%v30, %v30, %v20
+	la	ap, 16(ap)
+	brctg	n, L(top)
+
+L(end):	vzero	%v29
+	vsumqg	%v30, %v30, %v29
+	vlgvg	%r2, %v30, 1(%r0)
+	br	%r14
+EPILOGUE()
diff -r 55fa199cf6c6 -r ce3fcd438c6b mpn/s390_64/z13/submul_1.asm
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mpn/s390_64/z13/submul_1.asm	Wed Jul 26 14:31:07 2023 +0200
@@ -0,0 +1,108 @@
+dnl  S/390-64 mpn_submul_1
+
+dnl  Copyright 2023 Free Software Foundation, Inc.
+
+dnl  This file is part of the GNU MP Library.
+dnl
+dnl  The GNU MP Library is free software; you can redistribute it and/or modify
+dnl  it under the terms of either:
+dnl
+dnl    * the GNU Lesser General Public License as published by the Free
+dnl      Software Foundation; either version 3 of the License, or (at your
+dnl      option) any later version.
+dnl
+dnl  or
+dnl
+dnl    * the GNU General Public License as published by the Free Software
+dnl      Foundation; either version 2 of the License, or (at your option) any
+dnl      later version.
+dnl
+dnl  or both in parallel, as here.
+dnl
+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 General Public License
+dnl  for more details.
+dnl
+dnl  You should have received copies of the GNU General Public License and the
+dnl  GNU Lesser General Public License along with the GNU MP Library.  If not,
+dnl  see https://www.gnu.org/licenses/.
+
+include(`../config.m4')
+
+dnl TODO


More information about the gmp-commit mailing list