]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/cgo: remove APPLE macros on 386, arm, and ppc64 assembly files
authorCherry Mui <cherryyz@google.com>
Fri, 2 Dec 2022 19:07:33 +0000 (14:07 -0500)
committerCherry Mui <cherryyz@google.com>
Tue, 31 Jan 2023 19:44:32 +0000 (19:44 +0000)
We don't support Apple platform on 386, ARM, or PPC64. Remove
dead code.

Change-Id: I5722bf58c0fb73c5db4ba016cb424e392739c7de
Reviewed-on: https://go-review.googlesource.com/c/go/+/455162
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/runtime/cgo/gcc_386.S
src/runtime/cgo/gcc_arm.S
src/runtime/cgo/gcc_linux_ppc64x.S

index 5e6d715ce2ff9d43e2ab2a14548e95d0698e4c8a..5bd677f4d68c34a50e93023f56871a0509a061b7 100644 (file)
@@ -5,9 +5,9 @@
 .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
index 6e8c14a28d86a4669b76c8d0a9df9b223d37d319..474fc23a39be3154827f3b2cee343e154338be25 100644 (file)
@@ -4,19 +4,6 @@
 
 .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)
  *
@@ -24,8 +11,8 @@
  * 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
index 5c8b3e70bb02e650a4b819607f5501948dc6b196..e67deaacf2533c6224aa311822a38447a1904bd4 100644 (file)
@@ -6,15 +6,6 @@
 
 .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)
  *
@@ -22,8 +13,8 @@
  * 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