all: delete regabireflect goexperiment

regabireflect goexperiment was helpful in the register ABI
development, to control code paths for reflect calls, before the
compiler can generate register ABI everywhere. It is not necessary
for now. Drop it.

Change-Id: I2731197d2f496e29616c426a01045c9b685946a4
Reviewed-on: https://go-review.googlesource.com/c/go/+/393362
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
Cherry Mui 2022-03-15 13:27:53 -04:00
parent 12eca21f1c
commit 3684abbf6c
11 changed files with 9 additions and 36 deletions

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build goexperiment.regabireflect
//go:build goexperiment.regabiargs
package abi

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build !goexperiment.regabireflect && !amd64
//go:build !goexperiment.regabiargs && !amd64
package abi

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build goexperiment.regabireflect && (ppc64 || ppc64le)
//go:build goexperiment.regabiargs && (ppc64 || ppc64le)
package abi

View File

@ -54,7 +54,6 @@ func ParseGOEXPERIMENT(goos, goarch, goexp string) (flags, baseline goexperiment
baseline = goexperiment.Flags{
RegabiWrappers: regabiSupported,
RegabiReflect: regabiSupported,
RegabiArgs: regabiSupported,
PacerRedesign: true,
}
@ -81,7 +80,6 @@ func ParseGOEXPERIMENT(goos, goarch, goexp string) (flags, baseline goexperiment
// do the right thing.
names["regabi"] = func(v bool) {
flags.RegabiWrappers = v
flags.RegabiReflect = v
flags.RegabiArgs = v
}
@ -113,17 +111,15 @@ func ParseGOEXPERIMENT(goos, goarch, goexp string) (flags, baseline goexperiment
// regabi is always enabled on amd64.
if goarch == "amd64" {
flags.RegabiWrappers = true
flags.RegabiReflect = true
flags.RegabiArgs = true
}
// regabi is only supported on amd64, arm64, ppc64 and ppc64le.
if !regabiSupported {
flags.RegabiReflect = false
flags.RegabiArgs = false
}
// Check regabi dependencies.
if flags.RegabiArgs && !(flags.RegabiWrappers && flags.RegabiReflect) {
err = fmt.Errorf("GOEXPERIMENT regabiargs requires regabiwrappers,regabireflect")
if flags.RegabiArgs && !flags.RegabiWrappers {
err = fmt.Errorf("GOEXPERIMENT regabiargs requires regabiwrappers")
}
return
}

View File

@ -1,9 +0,0 @@
// Code generated by mkconsts.go. DO NOT EDIT.
//go:build !goexperiment.regabireflect
// +build !goexperiment.regabireflect
package goexperiment
const RegabiReflect = false
const RegabiReflectInt = 0

View File

@ -1,9 +0,0 @@
// Code generated by mkconsts.go. DO NOT EDIT.
//go:build goexperiment.regabireflect
// +build goexperiment.regabireflect
package goexperiment
const RegabiReflect = true
const RegabiReflectInt = 1

View File

@ -72,11 +72,6 @@ type Flags struct {
// ABI0 and ABIInternal functions. Without this, the ABIs are
// assumed to be identical so cross-ABI calls are direct.
RegabiWrappers bool
// RegabiReflect enables the register-passing paths in
// reflection calls. This is also gated by intArgRegs in
// reflect and runtime (which are disabled by default) so it
// can be used in targeted tests.
RegabiReflect bool
// RegabiArgs enables register arguments/results in all
// compiled Go functions.
//

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build goexperiment.regabireflect && goexperiment.regabiargs
//go:build goexperiment.regabiargs
package reflect_test

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build goexperiment.regabireflect
//go:build goexperiment.regabiargs
// This file contains tests specific to making sure the register ABI
// works in a bunch of contexts in the runtime.

View File

@ -317,7 +317,7 @@ TEXT runtime·morestack_noctxt(SB),NOSPLIT|NOFRAME,$0-0
MOVW $0, R26
B runtime·morestack(SB)
#ifdef GOEXPERIMENT_regabireflect
#ifdef GOEXPERIMENT_regabiargs
// spillArgs stores return values from registers to a *internal/abi.RegArgs in R20.
TEXT ·spillArgs(SB),NOSPLIT,$0-0
MOVD R0, (0*8)(R20)

View File

@ -788,7 +788,7 @@ TEXT runtime·cputicks(SB),NOSPLIT,$0-8
MOVD R3, ret+0(FP)
RET
#ifdef GOEXPERIMENT_regabireflect
#ifdef GOEXPERIMENT_regabiargs
// spillArgs stores return values from registers to a *internal/abi.RegArgs in R20.
TEXT runtime·spillArgs(SB),NOSPLIT,$0-0
MOVD R3, 0(R20)