This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 6/6] aarch64: Use tpidr_el0 rather than __errno_location in librt
- From: Richard Henderson <rth at twiddle dot net>
- To: libc-alpha at sourceware dot org
- Cc: marcus dot shawcroft at gmail dot com, Richard Henderson <rth at redhat dot com>
- Date: Tue, 20 May 2014 13:56:18 -0700
- Subject: [PATCH 6/6] aarch64: Use tpidr_el0 rather than __errno_location in librt
- Authentication-results: sourceware.org; auth=none
- References: <1400619378-7262-1-git-send-email-rth at twiddle dot net>
From: Richard Henderson <rth@redhat.com>
* sysdeps/unix/sysv/linux/aarch64/sysdep.h
[NOT_IN_libc] (SYSCALL_ERROR_HANDLER): Use tpidr_el0 rather
than __errno_location.
---
sysdeps/unix/sysv/linux/aarch64/sysdep.h | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/sysdeps/unix/sysv/linux/aarch64/sysdep.h b/sysdeps/unix/sysv/linux/aarch64/sysdep.h
index b32a565..73782a6 100644
--- a/sysdeps/unix/sysv/linux/aarch64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/aarch64/sysdep.h
@@ -123,21 +123,12 @@
# define SYSCALL_ERROR_HANDLER \
.Lsyscall_error: \
- stp x29, x30, [sp, -32]!; \
- cfi_adjust_cfa_offset (32); \
- cfi_rel_offset (x29, 0); \
- cfi_rel_offset (x30, 8); \
- add x29, sp, 0; \
- str x19, [sp,16]; \
- neg x19, x0; \
- bl C_SYMBOL_NAME(__errno_location); \
- str w19, [x0]; \
+ adrp x1, :gottprel:errno; \
+ neg w2, w0; \
+ ldr x1, [x1, :gottprel_lo12:errno]; \
+ mrs x3, tpidr_el0; \
mov x0, -1; \
- ldr x19, [sp,16]; \
- ldp x29, x30, [sp], 32; \
- cfi_adjust_cfa_offset (-32); \
- cfi_restore (x29); \
- cfi_restore (x30); \
+ str w2, [x1, x3]; \
RET;
# endif
# else
--
1.9.0