Skip to content

Commit 3b98ebc

Browse files
committed
Change to MOVS for all targets
1 parent 3c51257 commit 3b98ebc

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

platform/mbed_application.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,7 @@ static void powerdown_scb(uint32_t vtor)
161161

162162
__asm static void start_new_application(void *sp, void *pc)
163163
{
164-
#if defined(__CORTEX_M0PLUS)
165164
MOVS R2, #0
166-
#else
167-
MOV R2, #0
168-
#endif
169165
MSR CONTROL, R2 // Switch to main stack
170166
MOV SP, R0
171167
MSR PRIMASK, R2 // Enable interrupts
@@ -177,13 +173,7 @@ __asm static void start_new_application(void *sp, void *pc)
177173
void start_new_application(void *sp, void *pc)
178174
{
179175
__asm volatile(
180-
#if defined(__CORTEX_M0PLUS)
181-
"movs r2, #0 \n" // No MOVW instruction on Cortex-M0+
182-
#else
183-
"movw r2, #0 \n" // Fail to compile "mov r2, #0" with ARMC6. Replace with MOVW.
184-
#endif
185-
// We needn't "movt r2, #0" immediately following because MOVW
186-
// will zero-extend the 16-bit immediate.
176+
"movs r2, #0 \n"
187177
"msr control, r2 \n" // Switch to main stack
188178
"mov sp, %0 \n"
189179
"msr primask, r2 \n" // Enable interrupts

0 commit comments

Comments
 (0)