summaryrefslogtreecommitdiff
path: root/coroutine.c
diff options
context:
space:
mode:
Diffstat (limited to 'coroutine.c')
-rw-r--r--coroutine.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/coroutine.c b/coroutine.c
index 50e4135..01418bd 100644
--- a/coroutine.c
+++ b/coroutine.c
@@ -170,7 +170,7 @@ static void call_with_stack(void *stack, cr_fn_t fn, void *args) {
asm volatile ("mov r0, sp\n\t" /* [saved_sp = sp */
"str r0, %0\n\t" /* ] */
"mov sp, %1\n\t" /* [sp = stack] */
- "mov r0, %1\n\t" /* [arg0 = args] */
+ "mov r0, %3\n\t" /* [arg0 = args] */
"blx %2\n\t" /* [fn()] */
"ldr r0, %0\n\t" /* [sp = staved_sp */
"mov sp, r0" /* ] */