CVS commit: src/lib/libpthread/arch/arm

2018-11-22 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Nov 22 20:38:59 UTC 2018

Modified Files:
src/lib/libpthread/arch/arm: pthread_md.h

Log Message:
G/C __APCS_26__ support


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/lib/libpthread/arch/arm/pthread_md.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libpthread/arch/arm/pthread_md.h
diff -u src/lib/libpthread/arch/arm/pthread_md.h:1.10 src/lib/libpthread/arch/arm/pthread_md.h:1.11
--- src/lib/libpthread/arch/arm/pthread_md.h:1.10	Mon Jul 17 20:24:07 2017
+++ src/lib/libpthread/arch/arm/pthread_md.h	Thu Nov 22 20:38:59 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread_md.h,v 1.10 2017/07/17 20:24:07 skrll Exp $	*/
+/*	$NetBSD: pthread_md.h,v 1.11 2018/11/22 20:38:59 skrll Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -66,15 +66,8 @@ pthread__sp(void)
  * Set initial, sane values for registers whose values aren't just
  * "don't care".
  */
-#ifdef __APCS_26__
-#define _INITCONTEXT_U_MD(ucp)		\
-/* Set R15_MODE_USR in the PC */	\
-	(ucp)->uc_mcontext.__gregs[_REG_PC] =\
-	 ((ucp)->uc_mcontext.__gregs[_REG_PC] & 0x3fc) | 0x0;
-#else
 /* Set CPSR to PSR_USR32_MODE (0x10) from arm/armreg.h */
 #define _INITCONTEXT_U_MD(ucp)		\
 	(ucp)->uc_mcontext.__gregs[_REG_CPSR] = 0x10;
-#endif
 
 #endif /* _LIB_PTHREAD_ARM_MD_H */



CVS commit: src/lib/libpthread/arch/arm

2017-07-17 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Jul 17 20:24:07 UTC 2017

Modified Files:
src/lib/libpthread/arch/arm: pthread_md.h

Log Message:
Typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libpthread/arch/arm/pthread_md.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libpthread/arch/arm/pthread_md.h
diff -u src/lib/libpthread/arch/arm/pthread_md.h:1.9 src/lib/libpthread/arch/arm/pthread_md.h:1.10
--- src/lib/libpthread/arch/arm/pthread_md.h:1.9	Thu Aug 15 22:37:29 2013
+++ src/lib/libpthread/arch/arm/pthread_md.h	Mon Jul 17 20:24:07 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread_md.h,v 1.9 2013/08/15 22:37:29 matt Exp $	*/
+/*	$NetBSD: pthread_md.h,v 1.10 2017/07/17 20:24:07 skrll Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -72,7 +72,7 @@ pthread__sp(void)
 	(ucp)->uc_mcontext.__gregs[_REG_PC] =\
 	 ((ucp)->uc_mcontext.__gregs[_REG_PC] & 0x3fc) | 0x0;
 #else
-/* Set CPSR to PSR_USE32_MODE (0x10) from arm/armreg.h */
+/* Set CPSR to PSR_USR32_MODE (0x10) from arm/armreg.h */
 #define _INITCONTEXT_U_MD(ucp)		\
 	(ucp)->uc_mcontext.__gregs[_REG_CPSR] = 0x10;
 #endif



CVS commit: src/lib/libpthread/arch/arm

2013-08-15 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Aug 15 22:37:29 UTC 2013

Modified Files:
src/lib/libpthread/arch/arm: pthread_md.h

Log Message:
Use the thumb1 versions of sev/wfe for thumb && armv6+.
if using armv5t don't do anything for thumb.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/lib/libpthread/arch/arm/pthread_md.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libpthread/arch/arm/pthread_md.h
diff -u src/lib/libpthread/arch/arm/pthread_md.h:1.8 src/lib/libpthread/arch/arm/pthread_md.h:1.9
--- src/lib/libpthread/arch/arm/pthread_md.h:1.8	Wed Sep 19 07:57:14 2012
+++ src/lib/libpthread/arch/arm/pthread_md.h	Thu Aug 15 22:37:29 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread_md.h,v 1.8 2012/09/19 07:57:14 matt Exp $	*/
+/*	$NetBSD: pthread_md.h,v 1.9 2013/08/15 22:37:29 matt Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -49,8 +49,16 @@ pthread__sp(void)
 	return (ret);
 }
 
+#if defined(__thumb__) && defined(_ARM_ARCH_6)
+#define pthread__smt_pause()	__asm __volatile(".inst.n 0xbf20") /* wfe */
+#define pthread__smt_wake()	__asm __volatile(".inst.n 0xbf40") /* sev */
+#elif !defined(__thumb__)
 #define pthread__smt_pause()	__asm __volatile(".inst 0xe320f002") /* wfe */
 #define pthread__smt_wake()	__asm __volatile(".inst 0xe320f004") /* sev */
+#else
+#define pthread__smt_pause()
+#define pthread__smt_wake()
+#endif
 
 #define	pthread__uc_sp(ucp)	((ucp)->uc_mcontext.__gregs[_REG_SP])
 



CVS commit: src/lib/libpthread/arch/arm

2012-09-19 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Sep 19 07:57:14 UTC 2012

Modified Files:
src/lib/libpthread/arch/arm: pthread_md.h

Log Message:
Use .inst instead of wfe/sev to shut up gas.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libpthread/arch/arm/pthread_md.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libpthread/arch/arm/pthread_md.h
diff -u src/lib/libpthread/arch/arm/pthread_md.h:1.7 src/lib/libpthread/arch/arm/pthread_md.h:1.8
--- src/lib/libpthread/arch/arm/pthread_md.h:1.7	Thu Aug 16 04:49:48 2012
+++ src/lib/libpthread/arch/arm/pthread_md.h	Wed Sep 19 07:57:14 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread_md.h,v 1.7 2012/08/16 04:49:48 matt Exp $	*/
+/*	$NetBSD: pthread_md.h,v 1.8 2012/09/19 07:57:14 matt Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -49,8 +49,8 @@ pthread__sp(void)
 	return (ret);
 }
 
-#define pthread__smt_pause()	__asm __volatile("wfe")
-#define pthread__smt_wake()	__asm __volatile("sev")
+#define pthread__smt_pause()	__asm __volatile(".inst 0xe320f002") /* wfe */
+#define pthread__smt_wake()	__asm __volatile(".inst 0xe320f004") /* sev */
 
 #define	pthread__uc_sp(ucp)	((ucp)->uc_mcontext.__gregs[_REG_SP])