about summary refs log tree commit diff
path: root/ports/sysdeps/unix/arm/sysdep.S
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2013-02-13 20:10:45 -0800
committerRichard Henderson <rth@twiddle.net>2013-03-06 07:46:38 -0800
commit5232b909bf31420497ec864e34f806a545017185 (patch)
tree83dda99ea71e22aab52f25e4be58d7d20bc9d848 /ports/sysdeps/unix/arm/sysdep.S
parent3ae44082ab30918a6f5aa135620dda08e62593d5 (diff)
downloadglibc-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/unix/arm/sysdep.S')
-rw-r--r--ports/sysdeps/unix/arm/sysdep.S12
1 files changed, 3 insertions, 9 deletions
diff --git a/ports/sysdeps/unix/arm/sysdep.S b/ports/sysdeps/unix/arm/sysdep.S
index d44ee4869a..d82ad258a0 100644
--- a/ports/sysdeps/unix/arm/sysdep.S
+++ b/ports/sysdeps/unix/arm/sysdep.S
@@ -37,14 +37,8 @@ __syscall_error:
 #endif
 
 #ifndef IS_IN_rtld
-	mov ip, lr
-	cfi_register (lr, ip)
-	mov r1, r0
-
-	mov r0, #0xffff0fff
-	mov lr, pc
-	sub pc, r0, #31
-
+	mov	r1, r0
+	GET_TLS (r2)
 	ldr	r2, 1f
 #ifdef __thumb__
 2:	add	r2, r2, pc
@@ -54,7 +48,7 @@ __syscall_error:
 #endif
 	str	r1, [r0, r2]
 	mvn	r0, #0
-	DO_RET(ip)
+	DO_RET(lr)
 
 1:	.word errno(gottpoff) + (. - 2b - PC_OFS)
 #elif RTLD_PRIVATE_ERRNO