mirror of https://git.musl-libc.org/git/musl
Browse Source
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.master
committed by
Rich Felker
1 changed files with 7 additions and 7 deletions
@ -1,17 +1,17 @@ |
|||
.global __tls_get_offset |
|||
.type __tls_get_offset,%function |
|||
__tls_get_offset: |
|||
ear %r0, %a0 |
|||
sllg %r0, %r0, 32 |
|||
ear %r0, %a1 |
|||
ear %r3, %a0 |
|||
sllg %r3, %r3, 32 |
|||
ear %r3, %a1 |
|||
|
|||
la %r1, 0(%r2, %r12) |
|||
|
|||
lg %r3, 0(%r1) |
|||
sllg %r4, %r3, 3 |
|||
lg %r5, 8(%r0) |
|||
lg %r0, 0(%r1) |
|||
sllg %r4, %r0, 3 |
|||
lg %r5, 8(%r3) |
|||
lg %r2, 0(%r4, %r5) |
|||
ag %r2, 8(%r1) |
|||
sgr %r2, %r0 |
|||
sgr %r2, %r3 |
|||
|
|||
br %r14 |
|||
|
|||
Loading…
Reference in new issue