From 4edadfae7be138a73961a8b78064464ff946cf15 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 2 Apr 2010 20:21:21 +0000 Subject: *** empty log message *** --- coro.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/coro.c b/coro.c index 188c0de..cbc5eeb 100644 --- a/coro.c +++ b/coro.c @@ -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" -- cgit v1.2.3