From 13926ac05a2c7dd8cc63c5dcac6d6c05633d0d46 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Wed, 15 Nov 2017 16:47:26 +0900 Subject: [PATCH] Fix Cortex-M0 version. --- chopstx-cortex-m.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chopstx-cortex-m.c b/chopstx-cortex-m.c index b4d7e4a..8795d5e 100644 --- a/chopstx-cortex-m.c +++ b/chopstx-cortex-m.c @@ -327,8 +327,8 @@ chx_sched (uint32_t yield) * pc: return address (= .L_CONTEXT_SWITCH_FINISH) * psr: INITIAL_XPSR scratch */ - asm ("ldr r1, =.L_CONTEXT_SWITCH_FINISH\n\t" - "mov r2, lr\n\t" + asm ("ldr r1, lr\n\t" + "mov r2, =.L_CONTEXT_SWITCH_FINISH\n\t" "mov r3, #128\n\t" "lsl r3, #17\n\t" "push {r1, r2, r3}\n\t"