aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/abi/abiutils.go
diff options
context:
space:
mode:
authorDavid Chase <drchase@google.com>2021-02-19 17:11:40 -0500
committerDavid Chase <drchase@google.com>2021-03-04 16:19:12 +0000
commita2d92b5143ad6ed1b55b71032c5c1f468ba76fd4 (patch)
tree303c0fae9984d9e23366e183825d0dd5421dc7ae /src/cmd/compile/internal/abi/abiutils.go
parent868a110c568591d9085996ba05c94593809a437a (diff)
downloadgo-a2d92b5143ad6ed1b55b71032c5c1f468ba76fd4.tar.gz
go-a2d92b5143ad6ed1b55b71032c5c1f468ba76fd4.zip
cmd/compile: register abi, morestack work and mole whacking
Morestack works for non-pointer register parameters Within a function body, pointer-typed parameters are correctly tracked. Results still not hooked up. For #40724. Change-Id: Icaee0b51d0da54af983662d945d939b756088746 Reviewed-on: https://go-review.googlesource.com/c/go/+/294410 Trust: David Chase <drchase@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/cmd/compile/internal/abi/abiutils.go')
-rw-r--r--src/cmd/compile/internal/abi/abiutils.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/abi/abiutils.go b/src/cmd/compile/internal/abi/abiutils.go
index 3eab4b8d8b..f84f8f8e01 100644
--- a/src/cmd/compile/internal/abi/abiutils.go
+++ b/src/cmd/compile/internal/abi/abiutils.go
@@ -5,6 +5,7 @@
package abi
import (
+ "cmd/compile/internal/ir"
"cmd/compile/internal/types"
"cmd/internal/src"
"fmt"
@@ -337,6 +338,9 @@ func (config *ABIConfig) updateOffset(result *ABIParamResultInfo, f *types.Field
if fOffset == types.BOGUS_FUNARG_OFFSET {
// Set the Offset the first time. After that, we may recompute it, but it should never change.
f.Offset = off
+ if f.Nname != nil {
+ f.Nname.(*ir.Name).SetFrameOffset(off)
+ }
} else if fOffset != off {
panic(fmt.Errorf("Offset changed from %d to %d", fOffset, off))
}