summaryrefslogtreecommitdiff
path: root/firmware/asm/arm/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/asm/arm/thread.c')
-rw-r--r--firmware/asm/arm/thread.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/asm/arm/thread.c b/firmware/asm/arm/thread.c
index cf685526e3..bd9f950616 100644
--- a/firmware/asm/arm/thread.c
+++ b/firmware/asm/arm/thread.c
@@ -73,15 +73,16 @@ static inline void store_context(void* addr)
73static inline void load_context(const void* addr) 73static inline void load_context(const void* addr)
74{ 74{
75 asm volatile( 75 asm volatile(
76 ".syntax unified \n"
76 "ldr r0, [%0, #40] \n" /* Load start pointer */ 77 "ldr r0, [%0, #40] \n" /* Load start pointer */
77 "cmp r0, #0 \n" /* Check for NULL */ 78 "cmp r0, #0 \n" /* Check for NULL */
78 79
79 /* If not already running, jump to start */ 80 /* If not already running, jump to start */
80#if ARM_ARCH == 4 && defined(USE_THUMB) 81#if ARM_ARCH == 4 && defined(USE_THUMB)
81 "ldmneia %0, { r0, r12 } \n" 82 "ldmiane %0, { r0, r12 } \n"
82 "bxne r12 \n" 83 "bxne r12 \n"
83#else 84#else
84 "ldmneia %0, { r0, pc } \n" 85 "ldmiane %0, { r0, pc } \n"
85#endif 86#endif
86 87
87 "ldmia %0, { r4-r11, sp, lr } \n" /* Load regs r4 to r14 from context */ 88 "ldmia %0, { r4-r11, sp, lr } \n" /* Load regs r4 to r14 from context */