From e1c01cf468046623cd8e5899cfaa99c64b0a3424 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 26 Oct 2006 06:50:20 +0000 Subject: *** empty log message *** --- coro.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'coro.c') diff --git a/coro.c b/coro.c index 0eaa150..19b5d21 100644 --- a/coro.c +++ b/coro.c @@ -178,8 +178,21 @@ void coro_create(coro_context *ctx, # elif CORO_LOSER setjmp (ctx->env); +#if __CYGWIN__ ctx->env[7] = (long)((char *)sptr + ssize); ctx->env[8] = (long)coro_init; +#elif defined(_M_IX86) + ((_JUMP_BUFFER *)&ctx->env)->Eip = (long)coro_init; + ((_JUMP_BUFFER *)&ctx->env)->Esp = (long)STACK_ADJUST_PTR (sptr,ssize); +#elif defined(_M_AMD64) + ((_JUMP_BUFFER *)&ctx->env)->Rip = (__int64)coro_init; + ((_JUMP_BUFFER *)&ctx->env)->Rsp = (__int64)STACK_ADJUST_PTR (sptr,ssize); +#elif defined(_M_IA64) + ((_JUMP_BUFFER *)&ctx->env)->StIIP = (__int64)coro_init; + ((_JUMP_BUFFER *)&ctx->env)->IntSp = (__int64)STACK_ADJUST_PTR (sptr,ssize); +#else +#error "microsoft libc or architecture not supported" +#endif # elif CORO_LINUX -- cgit v1.2.3