Skip to content

Commit 2b8b06e

Browse files
committed
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 <[email protected]> Run-TryBot: Austin Clements <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent 6c76ede commit 2b8b06e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/cmd/internal/objabi/util.go

+7
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,11 @@ func init() {
131131
addexp(f)
132132
}
133133
}
134+
135+
// regabi is only supported on amd64.
136+
if GOARCH != "amd64" {
137+
Regabi_enabled = 0
138+
}
134139
}
135140

136141
// Note: must agree with runtime.framepointer_enabled.
@@ -161,6 +166,7 @@ var (
161166
Fieldtrack_enabled int
162167
Preemptibleloops_enabled int
163168
Staticlockranking_enabled int
169+
Regabi_enabled int
164170
)
165171

166172
// Toolchain experiments.
@@ -174,6 +180,7 @@ var exper = []struct {
174180
{"fieldtrack", &Fieldtrack_enabled},
175181
{"preemptibleloops", &Preemptibleloops_enabled},
176182
{"staticlockranking", &Staticlockranking_enabled},
183+
{"regabi", &Regabi_enabled},
177184
}
178185

179186
var defaultExpstring = Expstring()

0 commit comments

Comments
 (0)