diff options
author | David Chase <drchase@google.com> | 2021-04-16 00:15:31 -0400 |
---|---|---|
committer | David Chase <drchase@google.com> | 2021-04-16 20:12:20 +0000 |
commit | b6e1c336037e53ae095e84cfed4a312d8fd3ad45 (patch) | |
tree | fb6a9784ec9249331e75f642bfd7d56e7ec9b266 /src/cmd/compile/internal/amd64 | |
parent | fff236e659fa819e036ab849130931dd6245c7b2 (diff) | |
download | go-b6e1c336037e53ae095e84cfed4a312d8fd3ad45.tar.gz go-b6e1c336037e53ae095e84cfed4a312d8fd3ad45.zip |
cmd/compile: spill all the parameters around morestack
former code only spilled those parameters mentioned in code
AT THE REGISTER LEVEL, this caused problems with liveness
sometimes (which worked on whole variables including
aggregates).
Updates #40724.
Change-Id: Ib9fdc50d95d1d2b1f1e405dd370540e88582ac71
Reviewed-on: https://go-review.googlesource.com/c/go/+/310690
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/amd64')
-rw-r--r-- | src/cmd/compile/internal/amd64/ssa.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/amd64/ssa.go b/src/cmd/compile/internal/amd64/ssa.go index 42c12953f9..38d2d43e27 100644 --- a/src/cmd/compile/internal/amd64/ssa.go +++ b/src/cmd/compile/internal/amd64/ssa.go @@ -989,9 +989,9 @@ func ssaGenValue(s *ssagen.State, v *ssa.Value) { // The loop only runs once. for _, ap := range v.Block.Func.RegArgs { // Pass the spill/unspill information along to the assembler, offset by size of return PC pushed on stack. - addr := ssagen.SpillSlotAddr(ap.Mem(), x86.REG_SP, v.Block.Func.Config.PtrSize) + addr := ssagen.SpillSlotAddr(ap, x86.REG_SP, v.Block.Func.Config.PtrSize) s.FuncInfo().AddSpill( - obj.RegSpill{Reg: ap.Reg(), Addr: addr, Unspill: loadByType(ap.Type()), Spill: storeByType(ap.Type())}) + obj.RegSpill{Reg: ap.Reg, Addr: addr, Unspill: loadByType(ap.Type), Spill: storeByType(ap.Type)}) } v.Block.Func.RegArgs = nil ssagen.CheckArgReg(v) |