Module Name: src
Committed By: matt
Date: Tue Aug 13 00:18:15 UTC 2013
Modified Files:
src/sys/arch/arm/include: asm.h
Log Message:
Add _THUMB_ENTRY and _ARM_ENTRY which do the appropriate things including
switching instruction sets.
Use __thumb__ to decide which _ENTRY gets defined as
To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/include/asm.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/include/asm.h
diff -u src/sys/arch/arm/include/asm.h:1.19 src/sys/arch/arm/include/asm.h:1.20
--- src/sys/arch/arm/include/asm.h:1.19 Sun Aug 11 04:39:18 2013
+++ src/sys/arch/arm/include/asm.h Tue Aug 13 00:18:15 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: asm.h,v 1.19 2013/08/11 04:39:18 matt Exp $ */
+/* $NetBSD: asm.h,v 1.20 2013/08/13 00:18:15 matt Exp $ */
/*
* Copyright (c) 1990 The Regents of the University of California.
@@ -41,6 +41,12 @@
.syntax unified
+#ifdef __thumb__
+#define THUMB_INSN(n) n
+#else
+#define THUMB_INSN(n)
+#endif
+
#define __BIT(n) (1 << (n))
#define __BITS(hi,lo) ((~((~0)<<((hi)+1)))&((~0)<<(lo)))
@@ -67,12 +73,16 @@
*/
#define _ASM_TYPE_FUNCTION %function
#define _ASM_TYPE_OBJECT %object
+#define _THUMB_ENTRY(x) \
+ .text; _ALIGN_TEXT; .globl x; .type x,_ASM_TYPE_FUNCTION; \
+ .thumb_func; .code 16; x:
+#define _ARM_ENTRY(x) \
+ .text; _ALIGN_TEXT; .globl x; .type x,_ASM_TYPE_FUNCTION; \
+ .code 32; x:
#ifdef __thumb__
-#define _ENTRY(x) \
- .text; _ALIGN_TEXT; .globl x; .type x,_ASM_TYPE_FUNCTION; .thumb_func; x:
+#define _ENTRY(x) _THUMB_ENTRY(x)
#else
-#define _ENTRY(x) \
- .text; _ALIGN_TEXT; .globl x; .type x,_ASM_TYPE_FUNCTION; x:
+#define _ENTRY(x) _ARM_ENTRY(x)
#endif
#define _END(x) .size x,.-x