mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.typeparams] all: always enable regabig on AMD64
Always enable regabig on AMD64, which enables the G register and the X15 zero register. Remove the fallback path. Also remove the regabig GOEXPERIMENT. On AMD64 it is always enabled (this CL). Other architectures already have a G register, except for 386, where there are too few registers and it is unlikely that we will reserve one. (If we really do, we can just add a new experiment). Change-Id: I229cac0060f48fe58c9fdaabd38d6fa16b8a0855 Reviewed-on: https://go-review.googlesource.com/c/go/+/327272 Trust: Cherry Mui <cherryyz@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
parent
2fe324858b
commit
c93d5d1a52
16 changed files with 13 additions and 122 deletions
|
|
@ -35,7 +35,6 @@ import (
|
|||
"cmd/internal/objabi"
|
||||
"cmd/internal/src"
|
||||
"cmd/internal/sys"
|
||||
"internal/buildcfg"
|
||||
"log"
|
||||
"math"
|
||||
"path"
|
||||
|
|
@ -647,13 +646,12 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym, newprog obj.ProgAlloc) {
|
|||
|
||||
var regg int16
|
||||
if !p.From.Sym.NoSplit() || p.From.Sym.Wrapper() {
|
||||
if ctxt.Arch.Family == sys.AMD64 && buildcfg.Experiment.RegabiG && cursym.ABI() == obj.ABIInternal {
|
||||
if ctxt.Arch.Family == sys.AMD64 && cursym.ABI() == obj.ABIInternal {
|
||||
regg = REGG // use the g register directly in ABIInternal
|
||||
} else {
|
||||
p = obj.Appendp(p, newprog)
|
||||
regg = REG_CX
|
||||
if ctxt.Arch.Family == sys.AMD64 {
|
||||
// Using this register means that stacksplit works w/ //go:registerparams even when !buildcfg.Experiment.RegabiG
|
||||
regg = REGG // == REG_R14
|
||||
}
|
||||
p = load_g(ctxt, p, newprog, regg) // load g into regg
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue