.file "gcc_386.S"
/*
- * Apple still insists on underscore prefixes for C function names.
+ * Windows still insists on underscore prefixes for C function names.
*/
-#if defined(__APPLE__) || defined(_WIN32)
+#if defined(_WIN32)
#define EXT(s) _##s
#else
#define EXT(s) s
.file "gcc_arm.S"
-/*
- * Apple still insists on underscore prefixes for C function names.
- */
-#if defined(__APPLE__)
-#define EXT(s) _##s
-#else
-#define EXT(s) s
-#endif
-
-// Apple's ld64 wants 4-byte alignment for ARM code sections.
-// .align in both Apple as and GNU as treat n as aligning to 2**n bytes.
-.align 2
-
/*
* void crosscall_arm1(void (*fn)(void), void (*setg_gcc)(void *g), void *g)
*
* Called from standard ARM EABI, where r4-r11 are callee-save, so they
* must be saved explicitly.
*/
-.globl EXT(crosscall_arm1)
-EXT(crosscall_arm1):
+.globl crosscall_arm1
+crosscall_arm1:
push {r4, r5, r6, r7, r8, r9, r10, r11, ip, lr}
mov r4, r0
mov r5, r1
.file "gcc_linux_ppc64x.S"
-/*
- * Apple still insists on underscore prefixes for C function names.
- */
-#if defined(__APPLE__)
-#define EXT(s) _##s
-#else
-#define EXT(s) s
-#endif
-
/*
* void crosscall_ppc64(void (*fn)(void), void *g)
*
* Called from standard ppc64 C ABI, where r2, r14-r31, f14-f31 are
* callee-save, so they must be saved explicitly.
*/
-.globl EXT(crosscall_ppc64)
-EXT(crosscall_ppc64):
+.globl crosscall_ppc64
+crosscall_ppc64:
// Start with standard C stack frame layout and linkage
mflr %r0
std %r0, 16(%r1) // Save LR in caller's frame