Commit e18e8a59 authored by Sam Rushing's avatar Sam Rushing

_wrap0(): (amd64) indexing off of %rsp rather than %rbp seems to avoid compiler differences.

parent b60ba7d9
......@@ -170,13 +170,7 @@ _wrap0 (void)
void * co;
// x86_64 passes args in registers. but coro.__create() puts
// the coroutine on the stack. fetch it from there.
// llvm does the prologue differently...
#ifdef __llvm__
__asm__ ("movq 16(%%rbp), %[co]" : [co] "=r" (co));
#else
__asm__ ("movq 8(%%rbp), %[co]" : [co] "=r" (co));
#endif
__asm__ ("movq 16(%%rsp), %[co]" : [co] "=r" (co));
_wrap1 (co);
__yield();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment