about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2014-05-20 16:17:20 -0400
committerRichard Henderson <rth@redhat.com>2014-05-25 15:10:15 -0400
commitc03d528f17586e307292d38dcc1bff7ce1d8d766 (patch)
tree9eea4c14b64a085389cdacc91ca1b4e61c9fa7cb
parent00451193f2a6d552b7b11aa5eebabbf943914d36 (diff)
downloadglibc-c03d528f17586e307292d38dcc1bff7ce1d8d766.tar.gz
glibc-c03d528f17586e307292d38dcc1bff7ce1d8d766.tar.xz
glibc-c03d528f17586e307292d38dcc1bff7ce1d8d766.zip
aarch64: Use tpidr_el0 rather than __read_tp in librt
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h
index fb37618e67..483d6fee7e 100644
--- a/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h
+++ b/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