]> Cypherpunks repositories - gostls13.git/commit
runtime: rework asmcgocall on ppc64x
authorJoel Sing <joel@sing.id.au>
Sat, 18 Mar 2023 08:51:52 +0000 (19:51 +1100)
committerJoel Sing <joel@sing.id.au>
Tue, 22 Aug 2023 02:47:15 +0000 (02:47 +0000)
commitb291538d33c2b79f592d4fef5e50eb12e95b1251
tree018726d886ab5f3ee68db25c1ecd09aac4a84e9f
parent26d4ce70d41fa65ae8e5d7437610aa2ee146803a
runtime: rework asmcgocall on ppc64x

On some platforms asmcgocall can be called with a nil g. Additionally, it
can be called when already on a the system (g0) stack or on a signal stack.
In these cases we do not need to switch (and/or cannot switch) to the
system stack and as a result, do not need to save the g.

Rework asmcgocall on ppc64x to follow the pattern used on other architectures,
such as amd64 and arm64, where a separate nosave path is called in the above
cases. The nil g case will be needed to support openbsd/ppc64.

Updates #56001

Change-Id: I431d4200bcbc4aaddeb617aefe18590165ff2927
Reviewed-on: https://go-review.googlesource.com/c/go/+/478775
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: Paul Murphy <murp@ibm.com>
Run-TryBot: Joel Sing <joel@sing.id.au>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/runtime/asm_ppc64x.s