From 2acf5e290a218cd52e9d97247eadcb08889e55e6 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 7 Nov 2008 16:39:35 +0000 Subject: *** empty log message *** --- coro.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'coro.c') diff --git a/coro.c b/coro.c index 3d47768..bc382d3 100644 --- a/coro.c +++ b/coro.c @@ -128,8 +128,8 @@ asm ( ".type coro_transfer, @function\n" "coro_transfer:\n" #if __amd64 -# define NUM_ALIGN 1 -# define NUM_SAVED 5 +# define NUM_SAVED 6 + "\tpush %rbp\n" "\tpush %rbx\n" "\tpush %r12\n" "\tpush %r13\n" @@ -142,19 +142,19 @@ asm ( "\tpop %r13\n" "\tpop %r12\n" "\tpop %rbx\n" + "\tpop %rbp\n" #elif __i386 -# define NUM_ALIGN 1 # define NUM_SAVED 4 + "\tpush %ebp\n" "\tpush %ebx\n" "\tpush %esi\n" "\tpush %edi\n" - "\tpush %ebp\n" "\tmov %esp, (%eax)\n" "\tmov (%edx), %esp\n" - "\tpop %ebp\n" "\tpop %edi\n" "\tpop %esi\n" "\tpop %ebx\n" + "\tpop %ebp\n" #else # error unsupported architecture #endif @@ -329,7 +329,7 @@ void coro_create (coro_context *ctx, # elif CORO_ASM ctx->sp = (volatile void **)(ssize + (char *)sptr); - ctx->sp -= NUM_ALIGN; + *--ctx->sp = (void *)abort; /* needed for alignment only */ *--ctx->sp = (void *)coro_init; ctx->sp -= NUM_SAVED; -- cgit v1.2.3