]> Cypherpunks repositories - gostls13.git/commit
reflect,runtime: use internal ABI for selected ASM routines, attempt 2
authorThan McIntosh <thanm@google.com>
Wed, 14 Oct 2020 12:36:11 +0000 (08:36 -0400)
committerThan McIntosh <thanm@google.com>
Fri, 30 Oct 2020 17:41:35 +0000 (17:41 +0000)
commita313eec3869c609c0da2402a4cac2d32113d599c
treeb7da1095459d0af37ffef04a17ccb17491b0cf1c
parent1af388f1c0a3f61903ea55098c135d153aac5ae7
reflect,runtime: use internal ABI for selected ASM routines, attempt 2

[This is a roll-forward of CL 262319, with a fix for some Darwin test
failures].

Change the definitions of selected runtime assembly routines
from ABI0 (the default) to ABIInternal. The ABIInternal def is
intended to indicate that these functions don't follow the existing Go
runtime ABI. In addition, convert the assembly reference to
runtime.main (from runtime.mainPC) to ABIInternal. Finally, for
functions such as "runtime.duffzero" that are called directly from
generated code, make sure that the compiler looks up the correct
ABI version.

This is intended to support the register abi work, however these
changes should not have any issues even when GOEXPERIMENT=regabi is
not in effect.

Updates #27539, #40724.

Change-Id: Idf507f1c06176073563845239e1a54dad51a9ea9
Reviewed-on: https://go-review.googlesource.com/c/go/+/266638
Trust: Than McIntosh <thanm@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
20 files changed:
src/cmd/compile/internal/gc/ssa.go
src/cmd/internal/obj/wasm/wasmobj.go
src/cmd/internal/obj/x86/obj6.go
src/reflect/asm_amd64.s
src/runtime/asm_amd64.s
src/runtime/asm_wasm.s
src/runtime/duff_amd64.s
src/runtime/mkpreempt.go
src/runtime/preempt_386.s
src/runtime/preempt_amd64.s
src/runtime/preempt_arm.s
src/runtime/preempt_arm64.s
src/runtime/preempt_mips64x.s
src/runtime/preempt_mipsx.s
src/runtime/preempt_ppc64x.s
src/runtime/preempt_riscv64.s
src/runtime/preempt_s390x.s
src/runtime/preempt_wasm.s
src/runtime/race_amd64.s
src/runtime/sys_linux_amd64.s