diff options
author | marcel <marcel@FreeBSD.org> | 2003-06-02 00:16:39 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2003-06-02 00:16:39 +0000 |
commit | a16e92bfa3cc19afd08f31e8ee4b5b996cdce803 (patch) | |
tree | e67f0623541f35543b097fb197db88ca1c99f42a /lib/libc | |
parent | e15b452288d6716cad4d5847be8c29ad04cd6136 (diff) | |
download | FreeBSD-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.c | 4 |
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; } |