--- cvsroot/libcoro/coro.c 2010/04/02 19:18:01 1.51 +++ cvsroot/libcoro/coro.c 2010/04/02 20:21:21 1.52 @@ -117,6 +117,8 @@ ".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 @@ "\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"