diff options
author | root <root> | 2006-10-26 06:50:20 +0000 |
---|---|---|
committer | root <root> | 2006-10-26 06:50:20 +0000 |
commit | e1c01cf468046623cd8e5899cfaa99c64b0a3424 (patch) | |
tree | 076df312c546f637d2de0ca4f33ca94804c96309 | |
parent | 2aa13ce57bf6090d157754f66e475d755f023ef6 (diff) |
*** empty log message ***
-rw-r--r-- | coro.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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 |