From 23dcd82fabcb81a40078fc904d604d63997aca6c Mon Sep 17 00:00:00 2001 From: ccli8 Date: Wed, 30 May 2018 09:39:07 +0800 Subject: [PATCH] Remove superfluous MOVT in mbed_start_application/start_new_application --- platform/mbed_application.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platform/mbed_application.c b/platform/mbed_application.c index 012f04a064..768e9c62df 100644 --- a/platform/mbed_application.c +++ b/platform/mbed_application.c @@ -125,8 +125,9 @@ __asm static void start_new_application(void *sp, void *pc) void start_new_application(void *sp, void *pc) { __asm volatile ( - "movw r2, #0 \n" // Fail to compile "mov r2, #0" with ARMC6. Replace with movw/movt. - "movt r2, #0 \n" + "movw r2, #0 \n" // Fail to compile "mov r2, #0" with ARMC6. Replace with MOVW. + // 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 "mov sp, %0 \n" "msr primask, r2 \n" // Enable interrupts