diff options
author | Richard Henderson <rth@redhat.com> | 2014-05-20 16:17:20 -0400 |
---|---|---|
committer | Will Newton <will.newton@linaro.org> | 2014-07-03 15:19:59 +0100 |
commit | 7f9152f0d543081a68a97f19a2f312b0f530d0a6 (patch) | |
tree | 88211c08524f15de4c0bfca48d10b71ee3251b77 | |
parent | 9e702f4190cc0ac2d1cc9838b20a7366600e6418 (diff) |
aarch64: Use tpidr_el0 rather than __read_tp in librt
-rw-r--r-- | libc/ports/ChangeLog.aarch64.linaro | 4 | ||||
-rw-r--r-- | libc/ports/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h | 14 |
2 files changed, 7 insertions, 11 deletions
diff --git a/libc/ports/ChangeLog.aarch64.linaro b/libc/ports/ChangeLog.aarch64.linaro index 7aa3b085e..83f96a009 100644 --- a/libc/ports/ChangeLog.aarch64.linaro +++ b/libc/ports/ChangeLog.aarch64.linaro @@ -1,5 +1,9 @@ 2014-05-29 Richard Henderson <rth@twiddle.net> + * sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h + [!NOT_IN_libc] (SINGLE_THREAD_P): Use tpidr_el0 instead of a + call to __read_tp. + * sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h (PSEUDO): Always allocate 64 bytes of stack frame. Use ldp/stp to create it and break it down. diff --git a/libc/ports/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h b/libc/ports/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h index 0f5bb514e..546ed7b55 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h +++ b/libc/ports/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h @@ -113,17 +113,9 @@ extern int __local_multiple_threads attribute_hidden; header.multiple_threads) == 0, 1) # else # define SINGLE_THREAD_P(R) \ - stp x0, x30, [sp, -16]!; \ - cfi_adjust_cfa_offset (16); \ - cfi_rel_offset (x0, 0); \ - cfi_rel_offset (x30, 8); \ - bl __read_tp; \ - sub x0, x0, PTHREAD_SIZEOF; \ - ldr w##R, [x0, PTHREAD_MULTIPLE_THREADS_OFFSET]; \ - ldp x0, x30, [sp], 16; \ - cfi_restore (x0); \ - cfi_restore (x30); \ - cfi_adjust_cfa_offset (-16) + mrs x##R, tpidr_el0; \ + sub x##R, x##R, PTHREAD_SIZEOF; \ + ldr w##R, [x##R, PTHREAD_MULTIPLE_THREADS_OFFSET] # endif # endif |