From 75fa7db9911e12f6b84964ddd847f63ce450b531 Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Mon, 2 Jun 2003 00:16:39 +0000 Subject: [PATCH] o Fix a cut-n-paste bug. We were clobbering rp with gp... o Make sure the arguments to ctx_wrapper() are loaded from the backing store by forcing an underflow. Do this by making all registers in the register frame local. --- lib/libc/ia64/gen/makecontext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/ia64/gen/makecontext.c b/lib/libc/ia64/gen/makecontext.c index 6d5223660b6..8a9e566d099 100644 --- a/lib/libc/ia64/gen/makecontext.c +++ b/lib/libc/ia64/gen/makecontext.c @@ -113,9 +113,9 @@ __makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...) memset(&ucp->uc_mcontext, 0, sizeof(ucp->uc_mcontext)); ucp->uc_mcontext.mc_special.sp = (intptr_t)args - 16; ucp->uc_mcontext.mc_special.bspstore = (intptr_t)bsp; - ucp->uc_mcontext.mc_special.pfs = 3; + ucp->uc_mcontext.mc_special.pfs = (3 << 7) | 3; ucp->uc_mcontext.mc_special.rsc = 0xf; ucp->uc_mcontext.mc_special.rp = ((struct fdesc*)ctx_wrapper)->ip; - ucp->uc_mcontext.mc_special.rp = ((struct fdesc*)ctx_wrapper)->gp; + ucp->uc_mcontext.mc_special.gp = ((struct fdesc*)ctx_wrapper)->gp; ucp->uc_mcontext.mc_special.fpsr = IA64_FPSR_DEFAULT; }