Skip to content
Browse files

_wrap0(): (amd64) indexing off of %rsp rather than %rbp seems to avoi…

…d compiler differences.
  • Loading branch information...
1 parent b60ba7d commit e18e8a590ccb4213bbd970e0c95a5a58c3e40419 @samrushing samrushing committed Dec 17, 2011
Showing with 1 addition and 7 deletions.
  1. +1 −7 coro/swap.c
View
8 coro/swap.c
@@ -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();
}

0 comments on commit e18e8a5

Please sign in to comment.
Something went wrong with that request. Please try again.