armcm_irq: Enhance clear_active_irq() so it works on cortex-m0

Minor rework of the assembler so that it does not require thumb-2
instructions.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2018-07-27 19:21:59 -04:00
parent 635a199a47
commit 50142cc1b3
1 changed files with 3 additions and 2 deletions

View File

@ -61,9 +61,10 @@ clear_active_irq(void)
" push { %1 }\n" " push { %1 }\n"
" adr %0, 1f\n" " adr %0, 1f\n"
" push { %0 }\n" " push { %0 }\n"
" push { r0, r1, r2, r3, r12, lr }\n" " push { r0, r1, r2, r3, r4, lr }\n"
" bx %2\n" " bx %2\n"
".align 4\n"
"1:\n" "1:\n"
: "=&r"(temp) : "r"(psr), "r"(0xfffffff9) : "cc"); : "=&r"(temp) : "r"(psr), "r"(0xfffffff9) : "r12", "cc");
} }
DECL_SHUTDOWN(clear_active_irq); DECL_SHUTDOWN(clear_active_irq);