diff options
-rw-r--r-- | coro.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -117,6 +117,8 @@ trampoline (int sig) ".globl coro_transfer\n" ".type coro_transfer, @function\n" "coro_transfer:\n" + /* windows, of course, gives a shit on the amd64 ABI and uses different registers */ + /* http://blogs.msdn.com/freik/archive/2005/03/17/398200.aspx */ #if __amd64 #define NUM_SAVED 6 "\tpush %rbp\n" @@ -126,16 +128,16 @@ trampoline (int sig) "\tpush %r14\n" "\tpush %r15\n" #if CORO_WIN_TIB - "\tpush %fs:0x0\n" - "\tpush %fs:0x8\n" - "\tpush %fs:0xc\n" + "\tpush %gs:0x0\n" + "\tpush %gs:0x8\n" + "\tpush %gs:0xc\n" #endif "\tmov %rsp, (%rdi)\n" "\tmov (%rsi), %rsp\n" #if CORO_WIN_TIB - "\tpop %fs:0xc\n" - "\tpop %fs:0x8\n" - "\tpop %fs:0x0\n" + "\tpop %gs:0xc\n" + "\tpop %gs:0x8\n" + "\tpop %gs:0x0\n" #endif "\tpop %r15\n" "\tpop %r14\n" |