mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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>
This commit is contained in:
parent
868a110c56
commit
a2d92b5143
11 changed files with 175 additions and 57 deletions
|
|
@ -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))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue