Fix the previous commit.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka
2019-11-21 15:04:40 +09:00
parent 86c21fbf5c
commit b17834876f
2 changed files with 5 additions and 5 deletions

View File

@@ -332,7 +332,7 @@ voluntary_context_switch (struct chx_thread *tp_next)
"mov r3, %0\n\t"
"push {%0, r2, r3}\n\t"
"ldr r2, =running\n\t"
"ldr %0, [r2]"
"ldr %0, [r2]\n\t"
"push {%0, r3}\n\t"
: "=r" (tp)
: /* no input */
@@ -427,8 +427,8 @@ voluntary_context_switch (struct chx_thread *tp_next)
"add sp, #12\n\t"
"pop {pc}\n\t"
".L_CONTEXT_SWITCH_FINISH:\n\t"
"add r1, r0, #16\n\t"
"ldr r0, [r1]" /* Get tp->v */
"add r0, #16\n\t"
"ldr r0, [r0]" /* Get tp->v */
: "=r" (result) /* Return value in R0 */
: "0" (tp_next)
: "memory");

View File

@@ -32,7 +32,7 @@ reset (void)
extern uint8_t __main_stack_end__;
extern void preempt (void);
extern void chx_timer_expired (void);
extern void chx_timer_handler (void);
extern void chx_handle_intr (void);
static void nmi (void)
@@ -85,7 +85,7 @@ handler vector[] __attribute__ ((section(".vectors"))) = {
none, /* Debug */
none, /* reserved */
preempt, /* PendSV */
chx_timer_expired, /* SysTick */
chx_timer_handler, /* SysTick */
/* 0x40 */
chx_handle_intr /* WWDG */, chx_handle_intr /* PVD */,
chx_handle_intr /* TAMPER */, chx_handle_intr /* RTC */,