// commented out there should be the actual values once
// we're ready to use the register ABI everywhere.
var (
- intArgRegs = 0 // abi.IntArgRegs
- floatArgRegs = 0 // abi.FloatArgRegs
- floatRegSize = uintptr(0) // uintptr(abi.EffectiveFloatRegSize)
+ intArgRegs = abi.IntArgRegs * experimentRegabiArgs
+ floatArgRegs = abi.FloatArgRegs * experimentRegabiArgs
+ floatRegSize = uintptr(abi.EffectiveFloatRegSize * experimentRegabiArgs)
)
// abiStep represents an ABI "instruction." Each instruction
--- /dev/null
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !goexperiment.regabiargs
+// +build !goexperiment.regabiargs
+
+package reflect
+
+const experimentRegabiArgs = 0
--- /dev/null
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build goexperiment.regabiargs
+// +build goexperiment.regabiargs
+
+package reflect
+
+const experimentRegabiArgs = 1
--- /dev/null
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !goexperiment.regabiargs
+// +build !goexperiment.regabiargs
+
+package runtime
+
+const experimentRegabiArgs = 0
--- /dev/null
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build goexperiment.regabiargs
+// +build goexperiment.regabiargs
+
+package runtime
+
+const experimentRegabiArgs = 1
// everywhere.
//
// Protected by finlock.
-var intArgRegs = 0 // abi.IntArgRegs
+var intArgRegs = abi.IntArgRegs * experimentRegabiArgs