[PATCH] Revert "Move popcount and hamdist back from z14 to z13 after needed edits."

Stefan Liebler stli at linux.ibm.com
Thu Aug 3 15:46:27 CEST 2023


This reverts commit d4f5fca6a1e8ceb3bda243e5a7afcc8762025f84.

Unfortunately not only the extended mnemonics are not available with z13,
but also vpopct M3=1-3 is reserved. Thus you'll get an illegal-instruction
if run on z13 as vector enhancement facility 1 (introduced with z14) is
not available.

This is recognized with test-fails if run on z13:
FAIL: t-bin
FAIL: t-fac_ui
FAIL: t-mfac_uiui
FAIL: t-primorial_ui
FAIL: t-hamdist
FAIL: t-popcount
FAIL: t-nextprime
---
 mpn/s390_64/{z13 => z14}/hamdist.asm  | 4 ++--
 mpn/s390_64/{z13 => z14}/popcount.asm | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
 rename mpn/s390_64/{z13 => z14}/hamdist.asm (97%)
 rename mpn/s390_64/{z13 => z14}/popcount.asm (97%)

diff --git a/mpn/s390_64/z13/hamdist.asm b/mpn/s390_64/z14/hamdist.asm
similarity index 97%
rename from mpn/s390_64/z13/hamdist.asm
rename to mpn/s390_64/z14/hamdist.asm
index 81c5174b4..be134ff4d 100644
--- a/mpn/s390_64/z13/hamdist.asm
+++ b/mpn/s390_64/z14/hamdist.asm
@@ -55,7 +55,7 @@ PROLOGUE(mpn_hamdist)
 L(odd):	vllezg	%v16, 0(ap)
 	vllezg	%v17, 0(bp)
 	vx	%v16, %v16, %v17
-	vpopct	%v30, %v16, 3
+	vpopctg	%v30, %v16
 	la	ap, 8(ap)
 	la	bp, 8(bp)
 	clgije	n, 0, L(end)
@@ -63,7 +63,7 @@ L(odd):	vllezg	%v16, 0(ap)
 L(top):	vl	%v16, 0(ap), 3
 	vl	%v17, 0(bp), 3
 	vx	%v16, %v16, %v17
-	vpopct	%v20, %v16, 3
+	vpopctg	%v20, %v16
 	vag	%v30, %v30, %v20
 	la	ap, 16(ap)
 	la	bp, 16(bp)
diff --git a/mpn/s390_64/z13/popcount.asm b/mpn/s390_64/z14/popcount.asm
similarity index 97%
rename from mpn/s390_64/z13/popcount.asm
rename to mpn/s390_64/z14/popcount.asm
index 35b1fc4da..38b24479a 100644
--- a/mpn/s390_64/z13/popcount.asm
+++ b/mpn/s390_64/z14/popcount.asm
@@ -52,12 +52,12 @@ PROLOGUE(mpn_popcount)
 	je	L(top)
 
 L(odd):	vllezg	%v16, 0(ap)
-	vpopct	%v30, %v16, 3
+	vpopctg	%v30, %v16
 	la	ap, 8(ap)
 	clgije	n, 0, L(end)
 
 L(top):	vl	%v16, 0(ap), 3
-	vpopct	%v20, %v16, 3
+	vpopctg	%v20, %v16
 	vag	%v30, %v30, %v20
 	la	ap, 16(ap)
 	brctg	n, L(top)
-- 
2.41.0



More information about the gmp-devel mailing list