Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/arch/arm/sys Add workaround for ARM cores that don'...



details:   https://anonhg.NetBSD.org/src/rev/475e5d04ce94
branches:  trunk
changeset: 773731:475e5d04ce94
user:      matt <matt%NetBSD.org@localhost>
date:      Tue Feb 14 17:32:43 2012 +0000

description:
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>

diffstat:

 lib/libc/arch/arm/sys/__aeabi_read_tp.S |  8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r 58d678143413 -r 475e5d04ce94 lib/libc/arch/arm/sys/__aeabi_read_tp.S
--- a/lib/libc/arch/arm/sys/__aeabi_read_tp.S   Tue Feb 14 17:29:51 2012 +0000
+++ b/lib/libc/arch/arm/sys/__aeabi_read_tp.S   Tue Feb 14 17:32:43 2012 +0000
@@ -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)



Home | Main Index | Thread Index | Old Index