diff options
author | Cherry Zhang <cherryyz@google.com> | 2021-02-02 18:20:16 -0500 |
---|---|---|
committer | Cherry Zhang <cherryyz@google.com> | 2021-02-08 16:30:07 +0000 |
commit | 5d7dc53888c3c91ef4122d584a064bc24b6f7540 (patch) | |
tree | a5b39dc4d83aa2fb9c72762968b0d0fc0bb65aea /src/cmd/compile/internal/ssa/config.go | |
parent | a21de9ec73b8a433cafd336448dc8111a4e4571e (diff) | |
download | go-5d7dc53888c3c91ef4122d584a064bc24b6f7540.tar.gz go-5d7dc53888c3c91ef4122d584a064bc24b6f7540.zip |
[dev.regabi] cmd/compile, runtime: reserve R14 as g registers on AMD64
This is a proof-of-concept change for using the g register on
AMD64. getg is now lowered to R14 in the new ABI. The g register
is not yet used in all places where it can be used (e.g. stack
bounds check, runtime assembly code).
Change-Id: I10123ddf38e31782cf58bafcdff170aee0ff0d1b
Reviewed-on: https://go-review.googlesource.com/c/go/+/289196
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa/config.go')
-rw-r--r-- | src/cmd/compile/internal/ssa/config.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/ssa/config.go b/src/cmd/compile/internal/ssa/config.go index 32cfd7e61e..c29bc8fae6 100644 --- a/src/cmd/compile/internal/ssa/config.go +++ b/src/cmd/compile/internal/ssa/config.go @@ -5,6 +5,7 @@ package ssa import ( + "cmd/compile/internal/base" "cmd/compile/internal/ir" "cmd/compile/internal/types" "cmd/internal/obj" @@ -197,7 +198,7 @@ func NewConfig(arch string, types Types, ctxt *obj.Link, optimize bool) *Config c.specialRegMask = specialRegMaskAMD64 c.FPReg = framepointerRegAMD64 c.LinkReg = linkRegAMD64 - c.hasGReg = false + c.hasGReg = base.Flag.ABIWrap case "386": c.PtrSize = 4 c.RegSize = 4 |