diff options
author | Russ Cox <rsc@golang.org> | 2020-12-21 01:55:44 -0500 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2020-12-22 19:31:57 +0000 |
commit | 7c8f5356abd7aadf32b028ce76a8a76cd5438258 (patch) | |
tree | dfa0df9dcdca4864abb46bd1c81309f2c3a0f24b /src/cmd/compile/internal/gc/main.go | |
parent | cb28c96be8b8010dd979e0723bf5a94b11962a93 (diff) | |
download | go-7c8f5356abd7aadf32b028ce76a8a76cd5438258.tar.gz go-7c8f5356abd7aadf32b028ce76a8a76cd5438258.zip |
[dev.regabi] cmd/compile: separate dowidth better
Having a global MaxWidth lets us avoid needing to
refer to thearch from split-out packages when all
they need is thearch.MAXWIDTH.
And make a couple interface changes to let dowidth
avoid importing package ir directly.
Then it can move into package types.
Change-Id: I2c12e8e22252597530e648848320e19bdd490a01
Reviewed-on: https://go-review.googlesource.com/c/go/+/279302
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/cmd/compile/internal/gc/main.go')
-rw-r--r-- | src/cmd/compile/internal/gc/main.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/gc/main.go b/src/cmd/compile/internal/gc/main.go index de2b3db36a..343ad9d1d9 100644 --- a/src/cmd/compile/internal/gc/main.go +++ b/src/cmd/compile/internal/gc/main.go @@ -208,6 +208,7 @@ func Main(archInit func(*Arch)) { Widthptr = thearch.LinkArch.PtrSize Widthreg = thearch.LinkArch.RegSize + MaxWidth = thearch.MAXWIDTH Target = new(ir.Package) |