43 lines
1.6 KiB
Diff
43 lines
1.6 KiB
Diff
Based on the following patch posted upstream and awaiting IBM review:
|
|
https://sourceware.org/pipermail/libc-alpha/2021-November/132856.html
|
|
|
|
Author: Florian Weimer <fweimer@redhat.com>
|
|
Date: Tue Nov 9 18:50:55 2021 +0100
|
|
|
|
s390: Use long branches across object boundaries (jgh instead of jh)
|
|
|
|
Depending on the layout chosen by the linker, the 16-bit displacement
|
|
of the jh instruction is insufficient to reach the target label.
|
|
|
|
Analysis of the linker failure was carried out by Nick Clifton.
|
|
|
|
Tested on a z13 and z15, s390x-linux-gnu only.
|
|
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
|
|
|
diff --git a/sysdeps/s390/memmem-arch13.S b/sysdeps/s390/memmem-arch13.S
|
|
index b59d60acf0f6aaa0..4faede0cd2f942e3 100644
|
|
--- a/sysdeps/s390/memmem-arch13.S
|
|
+++ b/sysdeps/s390/memmem-arch13.S
|
|
@@ -41,7 +41,7 @@ ENTRY(MEMMEM_ARCH13)
|
|
# error The arch13 variant of memmem needs the z13 variant of memmem!
|
|
# endif
|
|
clgfi %r5,9
|
|
- jh MEMMEM_Z13
|
|
+ jgh MEMMEM_Z13
|
|
|
|
aghik %r0,%r5,-1 /* vll needs highest index. */
|
|
bc 4,0(%r14) /* cc==1: return if needle-len == 0. */
|
|
diff --git a/sysdeps/s390/strstr-arch13.S b/sysdeps/s390/strstr-arch13.S
|
|
index faa969849e09c2e1..ffc34c2523ce635a 100644
|
|
--- a/sysdeps/s390/strstr-arch13.S
|
|
+++ b/sysdeps/s390/strstr-arch13.S
|
|
@@ -49,7 +49,7 @@ ENTRY(STRSTR_ARCH13)
|
|
# error The arch13 variant of strstr needs the z13 variant of strstr!
|
|
# endif
|
|
clgfi %r4,9
|
|
- jh STRSTR_Z13
|
|
+ jgh STRSTR_Z13
|
|
|
|
/* In case of a partial match, the vstrs instruction returns the index
|
|
of the partial match in a vector-register. Then we have to
|