From ce9a4a568da53665c96cdba651640aaf127e2444 Mon Sep 17 00:00:00 2001 From: grehan Date: Mon, 19 Jul 2004 12:05:07 +0000 Subject: The new program counter should go into the trapframe's srr0 and not the link register, which was lucky enough to work. --- lib/libc/powerpc/gen/makecontext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libc/powerpc/gen/makecontext.c') diff --git a/lib/libc/powerpc/gen/makecontext.c b/lib/libc/powerpc/gen/makecontext.c index 6f047df..d66e824 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 */ -- cgit v1.1