Remove superfluous MOVT in mbed_start_application/start_new_application

pull/6949/head
ccli8 2018-05-30 09:39:07 +08:00
parent 3c14cb6332
commit 23dcd82fab
1 changed files with 3 additions and 2 deletions

View File

@ -125,8 +125,9 @@ __asm static void start_new_application(void *sp, void *pc)
void start_new_application(void *sp, void *pc) void start_new_application(void *sp, void *pc)
{ {
__asm volatile ( __asm volatile (
"movw r2, #0 \n" // Fail to compile "mov r2, #0" with ARMC6. Replace with movw/movt. "movw r2, #0 \n" // Fail to compile "mov r2, #0" with ARMC6. Replace with MOVW.
"movt r2, #0 \n" // We needn't "movt r2, #0" immediately following because MOVW
// will zero-extend the 16-bit immediate.
"msr control, r2 \n" // Switch to main stack "msr control, r2 \n" // Switch to main stack
"mov sp, %0 \n" "mov sp, %0 \n"
"msr primask, r2 \n" // Enable interrupts "msr primask, r2 \n" // Enable interrupts