1
0
mirror of https://github.com/golang/go synced 2024-11-17 09:04:44 -07:00

runtime/cgo: remove APPLE macros on 386, arm, and ppc64 assembly files

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>
This commit is contained in:
Cherry Mui 2022-12-02 14:07:33 -05:00
parent b89a840d65
commit 08425feae5
3 changed files with 6 additions and 28 deletions

View 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

View 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

View 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