diff options
author | Richard Henderson <rth@twiddle.net> | 2013-02-13 20:10:45 -0800 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2013-03-06 07:46:38 -0800 |
commit | 5232b909bf31420497ec864e34f806a545017185 (patch) | |
tree | 83dda99ea71e22aab52f25e4be58d7d20bc9d848 /ports/sysdeps/arm/dl-tlsdesc.S | |
parent | 3ae44082ab30918a6f5aa135620dda08e62593d5 (diff) | |
download | glibc-5232b909bf31420497ec864e34f806a545017185.tar.gz glibc-5232b909bf31420497ec864e34f806a545017185.tar.xz glibc-5232b909bf31420497ec864e34f806a545017185.zip |
arm: Introduce and use GET_TLS
Factor out the sequence needed to call kuser_get_tls, as we can't play subtract into pc games in thumb mode. Prepare for hard-tp, pulling the save of LR into the macro.
Diffstat (limited to 'ports/sysdeps/arm/dl-tlsdesc.S')
-rw-r--r-- | ports/sysdeps/arm/dl-tlsdesc.S | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/ports/sysdeps/arm/dl-tlsdesc.S b/ports/sysdeps/arm/dl-tlsdesc.S index 7b4c8dfcb5..1a15272821 100644 --- a/ports/sysdeps/arm/dl-tlsdesc.S +++ b/ports/sysdeps/arm/dl-tlsdesc.S @@ -50,18 +50,9 @@ _dl_tlsdesc_return: .fnstart .align 2 _dl_tlsdesc_undefweak: - @ Are we allowed a misaligned stack pointer calling read_tp? - .save {lr} - stmdb sp!, {lr} - cfi_adjust_cfa_offset (4) - cfi_rel_offset (lr,0) - bl __aeabi_read_tp + GET_TLS (r1) rsb r0, r0, #0 - ldmia sp!, {lr} - cfi_adjust_cfa_offset (-4) - cfi_restore (lr) BX (lr) - cfi_endproc .fnend .size _dl_tlsdesc_undefweak, .-_dl_tlsdesc_undefweak @@ -106,7 +97,7 @@ _dl_tlsdesc_dynamic: cfi_rel_offset (r4,8) cfi_rel_offset (lr,12) ldr r1, [r0] /* td */ - bl __aeabi_read_tp + GET_TLS (lr) mov r4, r0 /* r4 = tp */ ldr r0, [r0] ldr r2, [r1, #8] /* gen_count */ |