Module Name: src
Committed By: matt
Date: Tue Feb 14 17:32:43 UTC 2012
Modified Files:
src/lib/libc/arch/arm/sys: __aeabi_read_tp.S
Log Message:
Add workaround for ARM cores that don't properly implement the MRC instruction
used for reading the thread pointer. This is the corresponding change which
was made to <arm/mcontext.h>
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/arm/sys/__aeabi_read_tp.S
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/arch/arm/sys/__aeabi_read_tp.S
diff -u src/lib/libc/arch/arm/sys/__aeabi_read_tp.S:1.1 src/lib/libc/arch/arm/sys/__aeabi_read_tp.S:1.2
--- src/lib/libc/arch/arm/sys/__aeabi_read_tp.S:1.1 Fri Nov 18 16:10:02 2011
+++ src/lib/libc/arch/arm/sys/__aeabi_read_tp.S Tue Feb 14 17:32:43 2012
@@ -2,4 +2,12 @@
ENTRY(__aeabi_read_tp)
mrc p15, 0, r0, c13, c0, 3
+#ifndef _ARM_ARCH_6
+ cmp r0, #0 /* was it zero? */
+ RETc(ne) /* return it's not zero */
+ push {r1} /* syscall zeroes r1 */
+ SYSTRAP(_lwp_getprivate) /* can't fail */
+ pop {r1} /* restore r1 */
+#endif
RET
+_END(__aeabi_read_tp)