summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorDavid Xu <davidxu@FreeBSD.org>2004-07-02 14:19:44 +0000
committerDavid Xu <davidxu@FreeBSD.org>2004-07-02 14:19:44 +0000
commita5a5d84784f44fe6e9e25b6ec71968e257202837 (patch)
tree15b4196989753942891f1493373b6a590ac1026f /lib/libc
parent828a0b71101adc8186b3b17c97f16b60afe65af0 (diff)
Notes
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/i386/gen/_ctx_start.S2
-rw-r--r--lib/libc/i386/gen/makecontext.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/libc/i386/gen/_ctx_start.S b/lib/libc/i386/gen/_ctx_start.S
index bfff53a0a3d4..91a06b863657 100644
--- a/lib/libc/i386/gen/_ctx_start.S
+++ b/lib/libc/i386/gen/_ctx_start.S
@@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$");
ENTRY(_ctx_start)
popl %eax /* get start function */
call *%eax /* call start function */
- movl %ebp, %esp /*
+ movl %esi, %esp /*
* setup stack for completion routine;
* ucp is now at top of stack
*/
diff --git a/lib/libc/i386/gen/makecontext.c b/lib/libc/i386/gen/makecontext.c
index a6fc6adaf621..1154459470d2 100644
--- a/lib/libc/i386/gen/makecontext.c
+++ b/lib/libc/i386/gen/makecontext.c
@@ -150,10 +150,11 @@ __makecontext(ucontext_t *ucp, void (*start)(void), int argc, ...)
* wrapper. Note that setcontext() pushes the return
* address onto the top of the stack, so allow for this
* by adjusting the stack downward 1 slot. Also set
- * %ebp to point to the base of the stack where ucp
+ * %esi to point to the base of the stack where ucp
* is stored.
*/
- ucp->uc_mcontext.mc_ebp = (int)argp;
+ ucp->uc_mcontext.mc_esi = (int)argp;
+ ucp->uc_mcontext.mc_ebp = 0;
ucp->uc_mcontext.mc_esp = (int)stack_top + sizeof(caddr_t);
ucp->uc_mcontext.mc_eip = (int)_ctx_start;
}