summaryrefslogtreecommitdiff
path: root/src/thread/s390x/__tls_get_offset.s
AgeCommit message (Collapse)AuthorLines
2025-10-12s390x: shuffle register usage in __tls_get_offset to avoid r0 as addressAlex Rønne Petersen-7/+7
This fixes an error in 6af4f25b899e89e4b91f8c197ae5a6ce04bcce7b: The r0 register is special in addressing modes on s390x and is interpreted as constant zero, i.e. lg %r5, 8(%r0) would effectively become lg %r5, 8. So care should be taken to never use r0 as an address register in s390x assembly.
2025-02-09s390x: manually inline __tls_get_addr in __tls_get_offsetAlex Rønne Petersen-10/+10
Calling __tls_get_addr with brasl is not valid since it's a global symbol; doing so results in an R_390_PC32DBL relocation error from lld. We could fix this by marking __tls_get_addr hidden since it is not part of the s390x ABI, or by using a different instruction. However, given its simplicity, it makes more sense to just manually inline it into __tls_get_offset for performance. The patch has been tested by applying to Zig's bundled musl copy and running the full Zig test suite under qemu-s390x.
2016-11-11add s390x portBobby Bingham-0/+17