musl: Manually inline __tls_get_addr into s390x __tls_get_offset.

See these mailing list threads:

* https://www.openwall.com/lists/musl/2024/11/23/3
* https://www.openwall.com/lists/musl/2025/01/24/1

This supplants cc73d7ad749df8d53da442faa2e7af5d69357b33.
This commit is contained in:
Alex Rønne Petersen 2025-01-24 06:15:46 +01:00
parent f77e1b8622
commit b3d9b0e3f6

View File

@ -1,18 +1,17 @@
.global __tls_get_offset
.type __tls_get_offset,%function
__tls_get_offset:
stmg %r14, %r15, 112(%r15)
aghi %r15, -160
ear %r0, %a0
sllg %r0, %r0, 32
ear %r0, %a1
la %r2, 0(%r2, %r12)
.hidden __tls_get_addr
brasl %r14, __tls_get_addr
la %r1, 0(%r2, %r12)
ear %r1, %a0
sllg %r1, %r1, 32
ear %r1, %a1
lg %r3, 0(%r1)
sllg %r4, %r3, 3
lg %r5, 8(%r0)
lg %r2, 0(%r4, %r5)
ag %r2, 8(%r1)
sgr %r2, %r0
sgr %r2, %r1
lmg %r14, %r15, 272(%r15)
br %r14