diff options
| author | Cherry Mui <cherryyz@google.com> | 2023-03-31 19:56:26 +0000 |
|---|---|---|
| committer | Cherry Mui <cherryyz@google.com> | 2023-04-03 18:58:39 +0000 |
| commit | 4ac638f4b7c49370a62db4e6232f2895d7bbda0d (patch) | |
| tree | 82a58296be851fe71b6ee2d1379acbc1e3373b94 /src/runtime/sys_linux_ppc64x.s | |
| parent | f46320849da89bea3e23bae985ad753d30bbc5da (diff) | |
| download | go-4ac638f4b7c49370a62db4e6232f2895d7bbda0d.tar.xz | |
Revert "Revert "runtime: consolidate function descriptor definitions on PPC64""
This reverts CL 481059, which in turn reverts CL 478917.
Reason for revert: reapply the original CL.
Change-Id: Icf6bb6a620313b44fadcc7f69a62fdbb943e34fd
Reviewed-on: https://go-review.googlesource.com/c/go/+/481075
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Paul Murphy <murp@ibm.com>
Diffstat (limited to 'src/runtime/sys_linux_ppc64x.s')
| -rw-r--r-- | src/runtime/sys_linux_ppc64x.s | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/src/runtime/sys_linux_ppc64x.s b/src/runtime/sys_linux_ppc64x.s index ec9b966c8c..44cd0e7b3e 100644 --- a/src/runtime/sys_linux_ppc64x.s +++ b/src/runtime/sys_linux_ppc64x.s @@ -447,18 +447,16 @@ TEXT runtime·sigfwd(SB),NOSPLIT,$0-32 MOVD 24(R1), R2 RET -#ifdef GOARCH_ppc64le +#ifdef GO_PPC64X_HAS_FUNCDESC +DEFINE_PPC64X_FUNCDESC(runtime·sigtramp, sigtramp<>) +// cgo isn't supported on ppc64, but we need to supply a cgoSigTramp function. +DEFINE_PPC64X_FUNCDESC(runtime·cgoSigtramp, sigtramp<>) +TEXT sigtramp<>(SB),NOSPLIT|NOFRAME|TOPFRAME,$0 +#else // ppc64le doesn't need function descriptors // Save callee-save registers in the case of signal forwarding. // Same as on ARM64 https://golang.org/issue/31827 . TEXT runtime·sigtramp(SB),NOSPLIT|NOFRAME,$0 -#else -// function descriptor for the real sigtramp -TEXT runtime·sigtramp(SB),NOSPLIT|NOFRAME,$0 - DWORD $sigtramp<>(SB) - DWORD $0 - DWORD $0 -TEXT sigtramp<>(SB),NOSPLIT|NOFRAME|TOPFRAME,$0 #endif // Start with standard C stack frame layout and linkage. MOVD LR, R0 @@ -627,7 +625,6 @@ TEXT sigtramp<>(SB),NOSPLIT|NOFRAME|TOPFRAME,$0 RET #ifdef GOARCH_ppc64le -// ppc64le doesn't need function descriptors TEXT runtime·cgoSigtramp(SB),NOSPLIT|NOFRAME,$0 // The stack unwinder, presumably written in C, may not be able to // handle Go frame correctly. So, this function is NOFRAME, and we @@ -722,14 +719,6 @@ sigtrampnog: MOVD R12, CTR MOVD R10, LR // restore LR JMP (CTR) -#else -// function descriptor for the real sigtramp -TEXT runtime·cgoSigtramp(SB),NOSPLIT|NOFRAME,$0 - DWORD $cgoSigtramp<>(SB) - DWORD $0 - DWORD $0 -TEXT cgoSigtramp<>(SB),NOSPLIT,$0 - JMP sigtramp<>(SB) #endif // Used by cgoSigtramp to inspect without clobbering R30/R31 via runtime.load_g. |
