[PATCH 03/11] s390: Fix extraction of TCB address in linker TLS tests
Jens Remus
jremus@linux.ibm.com
Thu Nov 13 13:21:36 GMT 2025
In s390 64-bit (s390x) linker TLS tests correct the extraction of the
TCB address from access registers a0 and a1.
ld/testsuite/
* ld-s390/tlsbin_64.s: Fix extracting of TCB.
* ld-s390/tlsbinpic_64.s: Likewise.
* ld-s390/tlspic1_64.s: Likewise.
* ld-s390/tlsbin_64.dd: Adapt expected test output patterns to
test changes.
* ld-s390/tlspic_64.dd: Likewise.
Signed-off-by: Jens Remus <jremus@linux.ibm.com>
---
ld/testsuite/ld-s390/tlsbin_64.dd | 4 ++--
ld/testsuite/ld-s390/tlsbin_64.s | 2 +-
ld/testsuite/ld-s390/tlsbinpic_64.s | 2 +-
ld/testsuite/ld-s390/tlspic1_64.s | 2 +-
ld/testsuite/ld-s390/tlspic_64.dd | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/ld/testsuite/ld-s390/tlsbin_64.dd b/ld/testsuite/ld-s390/tlsbin_64.dd
index 3a45a53d68e6..2ac61eeb7799 100644
--- a/ld/testsuite/ld-s390/tlsbin_64.dd
+++ b/ld/testsuite/ld-s390/tlsbin_64.dd
@@ -74,7 +74,7 @@ Disassembly of section .text:
+[0-9a-f]+: e3 b0 f0 00 00 24 stg %r11,0\(%r15\)
# extract TCB
+[0-9a-f]+: b2 4f 00 90 ear %r9,%a0
- +[0-9a-f]+: eb 94 00 20 00 0d sllg %r9,%r4,32
+ +[0-9a-f]+: eb 99 00 20 00 0d sllg %r9,%r9,32
+[0-9a-f]+: b2 4f 00 91 ear %r9,%a1
# GD -> IE because variable is not defined in executable
+[0-9a-f]+: e3 c0 d0 00 00 04 lg %r12,0\(%r13\)
@@ -197,7 +197,7 @@ Disassembly of section .text:
+[0-9a-f]+: e3 b0 f0 00 00 24 stg %r11,0\(%r15\)
# extract TCB
+[0-9a-f]+: b2 4f 00 90 ear %r9,%a0
- +[0-9a-f]+: eb 94 00 20 00 0d sllg %r9,%r4,32
+ +[0-9a-f]+: eb 99 00 20 00 0d sllg %r9,%r9,32
+[0-9a-f]+: b2 4f 00 91 ear %r9,%a1
# IE against global var
+[0-9a-f]+: e3 30 d0 00 00 04 lg %r3,0\(%r13\)
diff --git a/ld/testsuite/ld-s390/tlsbin_64.s b/ld/testsuite/ld-s390/tlsbin_64.s
index ff6a46b87ba0..b9ee8cda7ebc 100644
--- a/ld/testsuite/ld-s390/tlsbin_64.s
+++ b/ld/testsuite/ld-s390/tlsbin_64.s
@@ -43,7 +43,7 @@ _start:
/* Extract TCB */
ear %r9,%a0
- sllg %r9,%r4,32
+ sllg %r9,%r9,32
ear %r9,%a1
/* IE against global var */
diff --git a/ld/testsuite/ld-s390/tlsbinpic_64.s b/ld/testsuite/ld-s390/tlsbinpic_64.s
index 5cc8d6e9351e..1d9255a063d7 100644
--- a/ld/testsuite/ld-s390/tlsbinpic_64.s
+++ b/ld/testsuite/ld-s390/tlsbinpic_64.s
@@ -76,7 +76,7 @@ fn2:
/* Extract TCB */
ear %r9,%a0
- sllg %r9,%r4,32
+ sllg %r9,%r9,32
ear %r9,%a1
/* GD -> IE because variable is not defined in executable */
diff --git a/ld/testsuite/ld-s390/tlspic1_64.s b/ld/testsuite/ld-s390/tlspic1_64.s
index bc67b12515a6..efc9fae2ba58 100644
--- a/ld/testsuite/ld-s390/tlspic1_64.s
+++ b/ld/testsuite/ld-s390/tlspic1_64.s
@@ -88,7 +88,7 @@ fn1:
/* Extract TCB */
ear %r9,%a0
- sllg %r9,%r4,32
+ sllg %r9,%r9,32
ear %r9,%a1
/* GD */
diff --git a/ld/testsuite/ld-s390/tlspic_64.dd b/ld/testsuite/ld-s390/tlspic_64.dd
index 3b1f03e73666..34d31c2299cf 100644
--- a/ld/testsuite/ld-s390/tlspic_64.dd
+++ b/ld/testsuite/ld-s390/tlspic_64.dd
@@ -83,7 +83,7 @@ Disassembly of section .text:
+[0-9a-f]+: e3 b0 f0 00 00 24 stg %r11,0\(%r15\)
# extract TCB
+[0-9a-f]+: b2 4f 00 90 ear %r9,%a0
- +[0-9a-f]+: eb 94 00 20 00 0d sllg %r9,%r4,32
+ +[0-9a-f]+: eb 99 00 20 00 0d sllg %r9,%r9,32
+[0-9a-f]+: b2 4f 00 91 ear %r9,%a1
# GD
+[0-9a-f]+: e3 20 d0 00 00 04 lg %r2,0\(%r13\)
--
2.48.1
More information about the Binutils
mailing list