From d680fb299d154115051cebfb1eca34353254d36c Mon Sep 17 00:00:00 2001 From: root Date: Fri, 2 Apr 2010 19:04:04 +0000 Subject: *** empty log message *** --- coro.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/coro.c b/coro.c index 0e95fb9..abb0ee9 100644 --- a/coro.c +++ b/coro.c @@ -118,7 +118,14 @@ trampoline (int sig) ".type coro_transfer, @function\n" "coro_transfer:\n" #if __amd64 - #define NUM_SAVED 6 + #if CORO_WIN_TIB + #define NUM_SAVED 6+3 + "\tpush %fs:0x0\n" + "\tpush %fs:0x8\n" + "\tpush %fs:0xc\n" + #else + #define NUM_SAVED 6 + #endif "\tpush %rbp\n" "\tpush %rbx\n" "\tpush %r12\n" @@ -133,8 +140,20 @@ trampoline (int sig) "\tpop %r12\n" "\tpop %rbx\n" "\tpop %rbp\n" + #if CORO_WIN_TIB + "\tpop %fs:0xc\n" + "\tpop %fs:0x8\n" + "\tpop %fs:0x0\n" + #endif #elif __i386 - #define NUM_SAVED 4 + #if CORO_WIN_TIB + #define NUM_SAVED 4+3 + "\tpush %fs:0x0\n" + "\tpush %fs:0x4\n" + "\tpush %fs:0x8\n" + #else + #define NUM_SAVED 4 + #endif "\tpush %ebp\n" "\tpush %ebx\n" "\tpush %esi\n" @@ -145,6 +164,11 @@ trampoline (int sig) "\tpop %esi\n" "\tpop %ebx\n" "\tpop %ebp\n" + #if CORO_WIN_TIB + "\tpop %fs:0x8\n" + "\tpop %fs:0x4\n" + "\tpop %fs:0x0\n" + #endif #else #error unsupported architecture #endif -- cgit v1.2.3