import (
"internal/abi"
"internal/goarch"
- "internal/goexperiment"
"unsafe"
)
// commented out there should be the actual values once
// we're ready to use the register ABI everywhere.
var (
- intArgRegs = abi.IntArgRegs * goexperiment.RegabiArgsInt
- floatArgRegs = abi.FloatArgRegs * goexperiment.RegabiArgsInt
- floatRegSize = uintptr(abi.EffectiveFloatRegSize * goexperiment.RegabiArgsInt)
+ intArgRegs = abi.IntArgRegs
+ floatArgRegs = abi.FloatArgRegs
+ floatRegSize = uintptr(abi.EffectiveFloatRegSize)
)
// abiStep represents an ABI "instruction." Each instruction
import (
"fmt"
"internal/abi"
- "internal/goexperiment"
"math"
"os"
"regexp"
intRegs := regs.Ints[:]
floatRegs := regs.Floats[:]
fval := float64(42.0)
- if goexperiment.RegabiArgs {
+ if len(intRegs) > 0 {
intRegs[0] = 42
floatRegs[0] = math.Float64bits(fval)
} else {
}
var result0 int
var result1 float64
- if goexperiment.RegabiArgs {
+ if len(intRegs) > 0 {
result0 = int(intRegs[0])
result1 = math.Float64frombits(floatRegs[0])
} else {
import (
"internal/abi"
"internal/goarch"
- "internal/goexperiment"
"runtime/internal/math"
"unsafe"
)
// registers the system supports.
//
// Protected by finlock.
-var intArgRegs = abi.IntArgRegs * (goexperiment.RegabiArgsInt | goarch.IsAmd64)
+var intArgRegs = abi.IntArgRegs
import (
"bytes"
- "internal/goexperiment"
+ "internal/abi"
"internal/testenv"
"runtime"
"strings"
abiSel := func(x, y string) string {
// select expected output based on ABI
// In noopt build we always spill arguments so the output is the same as stack ABI.
- if optimized && goexperiment.RegabiArgs {
+ if optimized && abi.IntArgRegs > 0 {
return x
}
return y