diff -Naur a/libretro-common/libco/amd64.c b/libretro-common/libco/amd64.c
--- a/libretro-common/libco/amd64.c	2016-05-08 08:20:29.000000000 -0700
+++ b/libretro-common/libco/amd64.c	2016-05-10 14:58:50.221637488 -0700
@@ -5,7 +5,7 @@
 */
 
 #define LIBCO_C
-#include <libco.h>
+#include "libco.h"
 #include <assert.h>
 #include <stdlib.h>
 
@@ -21,6 +21,8 @@
 static thread_local cothread_t co_active_handle = 0;
 #ifndef CO_USE_INLINE_ASM
 static void (*co_swap)(cothread_t, cothread_t) = 0;
+#else
+void co_swap(cothread_t, cothread_t);
 #endif
 
 #ifdef _WIN32
@@ -81,7 +83,7 @@
          sizeof(co_swap_function), PAGE_EXECUTE_READWRITE, &old_privileges);
 }
 #else
-/* ABI: SystemV */
+//ABI: SystemV
 #ifndef CO_USE_INLINE_ASM
 static unsigned char co_swap_function[] = {
   0x48, 0x89, 0x26,                                 /* mov    [rsi],rsp      */
@@ -113,7 +115,29 @@
    mprotect((void*)base, size, PROT_READ | PROT_WRITE | PROT_EXEC);
 }
 #else
-void co_init(void) {}
+__asm__(
+".intel_syntax noprefix\n"
+".globl co_swap        \n"
+"co_swap:              \n"
+".globl _co_swap       \n" /* OSX ABI is different from Linux. */
+"_co_swap:             \n"
+"mov [rsi],rsp         \n"
+"mov [rsi+0x08],rbp    \n"
+"mov [rsi+0x10],rbx    \n"
+"mov [rsi+0x18],r12    \n"
+"mov [rsi+0x20],r13    \n"
+"mov [rsi+0x28],r14    \n"
+"mov [rsi+0x30],r15    \n"
+"mov rsp,[rdi]         \n"
+"mov rbp,[rdi+0x08]    \n"
+"mov rbx,[rdi+0x10]    \n"
+"mov r12,[rdi+0x18]    \n"
+"mov r13,[rdi+0x20]    \n"
+"mov r14,[rdi+0x28]    \n"
+"mov r15,[rdi+0x30]    \n"
+"ret                   \n"
+".att_syntax           \n"
+);
 #endif
 #endif
 
@@ -162,42 +186,11 @@
    free(handle);
 }
 
-#ifndef CO_USE_INLINE_ASM
 void co_switch(cothread_t handle)
 {
   register cothread_t co_previous_handle = co_active_handle;
   co_swap(co_active_handle = handle, co_previous_handle);
 }
-#else
-#ifdef __APPLE__
-#define ASM_PREFIX "_"
-#else
-#define ASM_PREFIX ""
-#endif
-__asm__(
-".intel_syntax noprefix         \n"
-".globl " ASM_PREFIX "co_switch              \n"
-ASM_PREFIX "co_switch:                     \n"
-"mov rsi, [rip+" ASM_PREFIX "co_active_handle]\n"
-"mov [rsi],rsp                  \n"
-"mov [rsi+0x08],rbp             \n"
-"mov [rsi+0x10],rbx             \n"
-"mov [rsi+0x18],r12             \n"
-"mov [rsi+0x20],r13             \n"
-"mov [rsi+0x28],r14             \n"
-"mov [rsi+0x30],r15             \n"
-"mov [rip+" ASM_PREFIX "co_active_handle], rdi\n"
-"mov rsp,[rdi]                  \n"
-"mov rbp,[rdi+0x08]             \n"
-"mov rbx,[rdi+0x10]             \n"
-"mov r12,[rdi+0x18]             \n"
-"mov r13,[rdi+0x20]             \n"
-"mov r14,[rdi+0x28]             \n"
-"mov r15,[rdi+0x30]             \n"
-"ret                            \n"
-".att_syntax                    \n"
-);
-#endif
 
 #ifdef __cplusplus
 }
