Rename myself
[bertos.git] / bertos / emul / switch_i386.S
index 6931d45c9986636b931ebb4be1411338dda471e7..39eb31d5f734e243ff44d28425b0991cbec28987 100644 (file)
@@ -2,7 +2,7 @@
  * \file
  * <!--
  * Copyright 2004 Develer S.r.l. (http://www.develer.com/)
- * Copyright 1999,2000,2001 Bernardo Innocenti <bernie@develer.com>
+ * Copyright 1999,2000,2001 Bernie Innocenti <bernie@codewiz.org>
  * This file is part of DevLib - See devlib/README for information.
  * -->
  *
  *
  * \version $Id$
  *
- * \author Bernardo Innocenti <bernie@develer.com>
+ * \author Bernie Innocenti <bernie@codewiz.org>
  */
 
+
+
+#ifdef __APPLE__
+    //This workaround is necessary to compile under OS X assembler.
+    #define SWITCH_CONTEXT _asm_switch_context
+    #define SWITCH_VERSION _asm_switch_version
+#else
+    #define SWITCH_CONTEXT asm_switch_context
+    #define SWITCH_VERSION asm_switch_version
+#endif
+
 /* void asm_switch_context(void ** new_sp, void ** save_sp) */
-.globl asm_switch_context
-asm_switch_context:
+.globl SWITCH_CONTEXT
+SWITCH_CONTEXT:
        pushl   %eax
        pushl   %ebx
        pushl   %ecx
@@ -37,8 +48,8 @@ asm_switch_context:
        ret
 
 /* int asm_switch_version(void) */
-.globl asm_switch_version
-asm_switch_version:
+.globl SWITCH_VERSION
+SWITCH_VERSION:
        mov     $1,%eax
        ret