aboutsummaryrefslogtreecommitdiff
path: root/sys/arm/include
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2015-05-11 19:04:32 +0000
committerAndrew Turner <andrew@FreeBSD.org>2015-05-11 19:04:32 +0000
commit8465de8e6c689e7a8197ace1dfc77b11cedf22d6 (patch)
treeec521e1847ab683b6cd203ff04fea3aaaee0879f /sys/arm/include
parent827422e3fde4f6e263a53f1cdd7f13345c6d0a51 (diff)
downloadsrc-8465de8e6c689e7a8197ace1dfc77b11cedf22d6.tar.gz
src-8465de8e6c689e7a8197ace1dfc77b11cedf22d6.zip
Mark thumb entry points as such when building for thumb, otherwise mark
them as arm.
Notes
Notes: svn path=/head/; revision=282778
Diffstat (limited to 'sys/arm/include')
-rw-r--r--sys/arm/include/asm.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/arm/include/asm.h b/sys/arm/include/asm.h
index 905dd8e071cb..0c25d7bdc1ab 100644
--- a/sys/arm/include/asm.h
+++ b/sys/arm/include/asm.h
@@ -87,7 +87,13 @@
*/
#define GLOBAL(x) .global x
-#define _LEENTRY(x) .type x,_ASM_TYPE_FUNCTION; x:
+#ifdef __thumb__
+#define _FUNC_MODE .code 16; .thumb_func
+#else
+#define _FUNC_MODE .code 32
+#endif
+
+#define _LEENTRY(x) .type x,_ASM_TYPE_FUNCTION; _FUNC_MODE; x:
#define _LEEND(x) /* nothing */
#define _EENTRY(x) GLOBAL(x); _LEENTRY(x)
#define _EEND(x) _LEEND(x)