diff --git a/lib/libc/powerpc/gen/makecontext.c b/lib/libc/powerpc/gen/makecontext.c index 6f047df7c5a1..d66e82457a4e 100644 --- a/lib/libc/powerpc/gen/makecontext.c +++ b/lib/libc/powerpc/gen/makecontext.c @@ -113,7 +113,7 @@ __makecontext(ucontext_t *ucp, void (*start)(void), int argc, ...) * Use caller-saved regs 14/15 to hold params that _ctx_start * will use to invoke the user-supplied func */ - mc->mc_lr = (uint32_t) _ctx_start; + mc->mc_srr0 = (uint32_t) _ctx_start; mc->mc_gpr[1] = (uint32_t) sp; /* new stack pointer */ mc->mc_gpr[14] = (uint32_t) start; /* r14 <- start */ mc->mc_gpr[15] = (uint32_t) ucp; /* r15 <- ucp */