From 8465de8e6c689e7a8197ace1dfc77b11cedf22d6 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Mon, 11 May 2015 19:04:32 +0000 Subject: [PATCH] Mark thumb entry points as such when building for thumb, otherwise mark them as arm. --- sys/arm/include/asm.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/arm/include/asm.h b/sys/arm/include/asm.h index 905dd8e071c..0c25d7bdc1a 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)