- Add gmp-6.3.0-s390x-fix.patch to fix s390x optimized code on z13.
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/gmp?expand=0&rev=95
This commit is contained in:
parent
e188658348
commit
6b51ba0d92
83
gmp-6.3.0-s390x-fix.patch
Normal file
83
gmp-6.3.0-s390x-fix.patch
Normal file
@ -0,0 +1,83 @@
|
||||
From stli@linux.ibm.com Thu Aug 3 13:46:44 2023
|
||||
Date: Thu, 3 Aug 2023 15:46:27 +0200
|
||||
From: Stefan Liebler <stli@linux.ibm.com>
|
||||
To: gmp-devel@gmplib.org
|
||||
Subject: [PATCH] Revert "Move popcount and hamdist back from z14 to z13 after needed edits."
|
||||
|
||||
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 a/mpn/s390_64/z13/hamdist.asm
|
||||
rename to b/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 a/mpn/s390_64/z13/popcount.asm
|
||||
rename to b/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
|
||||
|
||||
_______________________________________________
|
||||
gmp-devel mailing list
|
||||
gmp-devel@gmplib.org
|
||||
https://gmplib.org/mailman/listinfo/gmp-devel
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 22 11:51:01 UTC 2023 - Richard Biener <rguenther@suse.com>
|
||||
|
||||
- Add gmp-6.3.0-s390x-fix.patch to fix s390x optimized code on z13.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 4 08:09:53 UTC 2023 - Richard Biener <rguenther@suse.com>
|
||||
|
||||
|
2
gmp.spec
2
gmp.spec
@ -30,6 +30,7 @@ Source2: %{name}.keyring
|
||||
Source3: baselibs.conf
|
||||
# revert change causing bsc#1179751
|
||||
Patch1: gmp-6.2.1-arm64-invert_limb.patch
|
||||
Patch2: gmp-6.3.0-s390x-fix.patch
|
||||
BuildRequires: fipscheck
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: m4
|
||||
@ -78,6 +79,7 @@ huge numbers (integer and floating point).
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags} -fexceptions"
|
||||
|
Loading…
Reference in New Issue
Block a user