aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/gc
diff options
context:
space:
mode:
authorDavid Chase <drchase@google.com>2021-04-09 18:05:57 -0400
committerDavid Chase <drchase@google.com>2021-04-13 22:31:20 +0000
commitb4881d930a653ffc72cfcdff2902a627ba3a205c (patch)
tree7e447c8e183b16ab8493c99eaa90a8032cf74e79 /src/cmd/compile/internal/gc
parentefaf75a2166d397b2050cc0bb1b60b0c80698e2d (diff)
downloadgo-b4881d930a653ffc72cfcdff2902a627ba3a205c.tar.gz
go-b4881d930a653ffc72cfcdff2902a627ba3a205c.zip
cmd/compile: don't modify underlying type when creating bitmap for bodyless function
This fixes the build crash for GOEXPERIMENT=regabi,regabiargs GOOS=windows go build syscall Updates #40724. Change-Id: I4400f6ff2e83e7e7e93ad5e58c6063b327532504 Reviewed-on: https://go-review.googlesource.com/c/go/+/309110 Trust: David Chase <drchase@google.com> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/cmd/compile/internal/gc')
-rw-r--r--src/cmd/compile/internal/gc/compile.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/gc/compile.go b/src/cmd/compile/internal/gc/compile.go
index 6db37919fa..a71684a859 100644
--- a/src/cmd/compile/internal/gc/compile.go
+++ b/src/cmd/compile/internal/gc/compile.go
@@ -43,9 +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
+ types.CalcSize(fn.Type())
a := ssagen.AbiForBodylessFuncStackMap(fn)
- abiInfo := a.ABIAnalyze(fn.Type(), true) // will set parameter spill/home locations correctly
+ abiInfo := a.ABIAnalyzeFuncType(fn.Type().FuncType()) // abiInfo has spill/home locations for wrapper
liveness.WriteFuncMap(fn, abiInfo)
return
}