Skip to content

Commit

Permalink
aarch64: Use tpidr_el0 rather than __read_tp in librt
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Henderson committed May 29, 2014
1 parent b5be459 commit a17e5ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
14 changes: 3 additions & 11 deletions sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a17e5ff

Please sign in to comment.