diff options
author | David Chase <drchase@google.com> | 2021-03-01 17:31:20 -0500 |
---|---|---|
committer | David Chase <drchase@google.com> | 2021-03-02 15:26:33 +0000 |
commit | 97b32a6724ebc3a6029e06b6c4b3acb9c980b15a (patch) | |
tree | 549d68c2c8282bd4be34e0d7f4120503d19aae87 /src/cmd/compile/internal/gc | |
parent | 2b50ab2aee75d3c361fcd1eb39e830e2e73056b6 (diff) | |
download | go-97b32a6724ebc3a6029e06b6c4b3acb9c980b15a.tar.gz go-97b32a6724ebc3a6029e06b6c4b3acb9c980b15a.zip |
cmd/compile: better version of check frame offsets against abi
improved to run on more architectures.
this is in preparation for turning off calculation of frame offsets
in types.CalcSize.
Replaces https://go-review.googlesource.com/c/go/+/293392 .
Updates #44675.
For #40724.
Change-Id: I40ba496172447cf09b86bc646148859363c11ad9
Reviewed-on: https://go-review.googlesource.com/c/go/+/297637
Trust: David Chase <drchase@google.com>
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/cmd/compile/internal/gc')
-rw-r--r-- | src/cmd/compile/internal/gc/compile.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/gc/compile.go b/src/cmd/compile/internal/gc/compile.go index ba67c58c45..2d7a74a403 100644 --- a/src/cmd/compile/internal/gc/compile.go +++ b/src/cmd/compile/internal/gc/compile.go @@ -43,6 +43,9 @@ func enqueueFunc(fn *ir.Func) { if len(fn.Body) == 0 { // Initialize ABI wrappers if necessary. ssagen.InitLSym(fn, false) + types.CalcSize(fn.Type()) // TODO register args; remove this once all is done by abiutils + a := ssagen.AbiForFunc(fn) + a.ABIAnalyze(fn.Type()) // will set parameter spill/home locations correctly liveness.WriteFuncMap(fn) return } |