mirror of https://github.com/golang/go.git
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:
parent
12eca21f1c
commit
3684abbf6c
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue