1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-15 01:23:49 +01:00

cpu/cortexm_common: Fix inline asm for ARMv6-M so that it compiles in Clang as well

ARMv6 does not have the mov instruction, only movs
This commit is contained in:
Joakim Nohlgård 2016-01-17 11:45:39 +01:00
parent 72fb1790c0
commit efa5cd4066

View File

@ -154,12 +154,12 @@ __attribute__((naked)) void hard_fault_default(void)
"bhi fix_msp \n" /* goto fix_msp } */
"cmp r0, %[sram] \n" /* if(msp <= &_sram) { */
"bls fix_msp \n" /* goto fix_msp } */
"mov r1, #0 \n" /* else { corrupted = false */
"movs r1, #0 \n" /* else { corrupted = false */
"b test_sp \n" /* goto test_sp } */
" fix_msp: \n" /* */
"mov r1, %[estack] \n" /* r1 = _estack */
"mov sp, r1 \n" /* sp = r1 */
"mov r1, #1 \n" /* corrupted = true */
"movs r1, #1 \n" /* corrupted = true */
" test_sp: \n" /* */
"movs r0, #4 \n" /* r0 = 0x4 */
"mov r2, lr \n" /* r2 = lr */