summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2003-06-02 00:16:39 +0000
committermarcel <marcel@FreeBSD.org>2003-06-02 00:16:39 +0000
commita16e92bfa3cc19afd08f31e8ee4b5b996cdce803 (patch)
treee67f0623541f35543b097fb197db88ca1c99f42a /lib/libc
parente15b452288d6716cad4d5847be8c29ad04cd6136 (diff)
downloadFreeBSD-src-a16e92bfa3cc19afd08f31e8ee4b5b996cdce803.zip
FreeBSD-src-a16e92bfa3cc19afd08f31e8ee4b5b996cdce803.tar.gz
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.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/ia64/gen/makecontext.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/ia64/gen/makecontext.c b/lib/libc/ia64/gen/makecontext.c
index 6d52236..8a9e566 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;
}
OpenPOWER on IntegriCloud