summaryrefslogtreecommitdiffstats
path: root/lib/libc/alpha/gen
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2003-07-30 06:36:20 +0000
committermarcel <marcel@FreeBSD.org>2003-07-30 06:36:20 +0000
commit786da18d142cc6ad5a7cbab157cbe0cf828186ac (patch)
tree9d7154f73a8e13e3eb32f25303de9c75198abf1a /lib/libc/alpha/gen
parent8512070a52bb32100e8c97967590e21122064fa5 (diff)
downloadFreeBSD-src-786da18d142cc6ad5a7cbab157cbe0cf828186ac.zip
FreeBSD-src-786da18d142cc6ad5a7cbab157cbe0cf828186ac.tar.gz
Only allow trapframe formats instead of sigframe formats like the
comment says and don't write the first 3 arguments to FRAME_TRAPARG_* as they are specific to sigframes.
Diffstat (limited to 'lib/libc/alpha/gen')
-rw-r--r--lib/libc/alpha/gen/makecontext.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/alpha/gen/makecontext.c b/lib/libc/alpha/gen/makecontext.c
index 8adc137..b5f408c 100644
--- a/lib/libc/alpha/gen/makecontext.c
+++ b/lib/libc/alpha/gen/makecontext.c
@@ -90,7 +90,7 @@ __makecontext(ucontext_t *ucp, void (*start)(void), int argc, ...)
* Make sure the context is valid. For now, we only allow
* trapframe format contexts to be used for makecontext.
*/
- else if (ucp->uc_mcontext.mc_format == _MC_REV0_SIGFRAME) {
+ else if (ucp->uc_mcontext.mc_format == _MC_REV0_TRAPFRAME) {
/*
* Alpha passes the first 6 parameters in registers and
* remaining parameters on the stack. Set up the context
@@ -119,15 +119,15 @@ __makecontext(ucontext_t *ucp, void (*start)(void), int argc, ...)
va_start(ap, argc);
for (i = 0; i < argc; i++) {
switch (i) {
- case 0: ucp->uc_mcontext.mc_regs[FRAME_TRAPARG_A0] =
+ case 0: ucp->uc_mcontext.mc_regs[FRAME_A0] =
(unsigned long)va_arg(ap, intptr_t);
break;
- case 1: ucp->uc_mcontext.mc_regs[FRAME_TRAPARG_A1] =
+ case 1: ucp->uc_mcontext.mc_regs[FRAME_A1] =
(unsigned long)va_arg(ap, intptr_t);
break;
- case 2: ucp->uc_mcontext.mc_regs[FRAME_TRAPARG_A2] =
+ case 2: ucp->uc_mcontext.mc_regs[FRAME_A2] =
(unsigned long)va_arg(ap, intptr_t);
break;
OpenPOWER on IntegriCloud