Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/include If compiling for Thumb1, make __lwp_get...



details:   https://anonhg.NetBSD.org/src/rev/426576d7afcd
branches:  trunk
changeset: 789346:426576d7afcd
user:      matt <matt%NetBSD.org@localhost>
date:      Thu Aug 15 22:34:59 2013 +0000

description:
If compiling for Thumb1, make __lwp_getprivate_fast call __aeabi_read_tp.

diffstat:

 sys/arch/arm/include/mcontext.h |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (28 lines):

diff -r f9fdf1532885 -r 426576d7afcd sys/arch/arm/include/mcontext.h
--- a/sys/arch/arm/include/mcontext.h   Thu Aug 15 22:25:10 2013 +0000
+++ b/sys/arch/arm/include/mcontext.h   Thu Aug 15 22:34:59 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mcontext.h,v 1.15 2012/12/08 06:58:36 matt Exp $       */
+/*     $NetBSD: mcontext.h,v 1.16 2013/08/15 22:34:59 matt Exp $       */
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -123,6 +123,7 @@
 static __inline void *
 __lwp_getprivate_fast(void)
 {
+#if !defined(__thumb__) || defined(_ARM_ARCH_T2)
        extern void *_lwp_getprivate(void);
        void *rv;
        __asm("mrc p15, 0, %0, c13, c0, 3" : "=r"(rv));
@@ -135,6 +136,10 @@
         * syscall.
         */
        return _lwp_getprivate();
+#else
+       extern void *__aeabi_read_tp(void);
+       return __aeabi_read_tp();
+#endif /* !__thumb__ || _ARM_ARCH_T2 */
 }
 
 #if defined(_KERNEL)



Home | Main Index | Thread Index | Old Index