1
0
mirror of https://github.com/golang/go synced 2024-11-23 10:00:03 -07:00

cmd/internal/objabi: add regabi GOEXPERIMENT

This is the "feature flag" for the register calling convention work
(though since this work is expected to extend over a few releases,
it's not version-prefixed). This will let us develop the register
calling convention on the main branch while maintaining an easy toggle
between the old and new ABIs.

Updates #40724.

Change-Id: I129c8d87d34e6fa0910b6fa43efb35b706021637
Reviewed-on: https://go-review.googlesource.com/c/go/+/252257
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Austin Clements 2020-09-01 11:16:33 -04:00
parent 6c76edeb1b
commit 2b8b06ebbf

View File

@ -131,6 +131,11 @@ func init() {
addexp(f)
}
}
// regabi is only supported on amd64.
if GOARCH != "amd64" {
Regabi_enabled = 0
}
}
// Note: must agree with runtime.framepointer_enabled.
@ -161,6 +166,7 @@ var (
Fieldtrack_enabled int
Preemptibleloops_enabled int
Staticlockranking_enabled int
Regabi_enabled int
)
// Toolchain experiments.
@ -174,6 +180,7 @@ var exper = []struct {
{"fieldtrack", &Fieldtrack_enabled},
{"preemptibleloops", &Preemptibleloops_enabled},
{"staticlockranking", &Staticlockranking_enabled},
{"regabi", &Regabi_enabled},
}
var defaultExpstring = Expstring()