From 50142cc1b34c1c414910cffc5bb42930874ca3d0 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 27 Jul 2018 19:21:59 -0400 Subject: [PATCH] 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 --- src/generic/armcm_irq.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/generic/armcm_irq.c b/src/generic/armcm_irq.c index 9b5a67d5..6421e049 100644 --- a/src/generic/armcm_irq.c +++ b/src/generic/armcm_irq.c @@ -61,9 +61,10 @@ clear_active_irq(void) " push { %1 }\n" " adr %0, 1f\n" " push { %0 }\n" - " push { r0, r1, r2, r3, r12, lr }\n" + " push { r0, r1, r2, r3, r4, lr }\n" " bx %2\n" + ".align 4\n" "1:\n" - : "=&r"(temp) : "r"(psr), "r"(0xfffffff9) : "cc"); + : "=&r"(temp) : "r"(psr), "r"(0xfffffff9) : "r12", "cc"); } DECL_SHUTDOWN(clear_active_irq);