Skip to content

Commit 67d69f8

Browse files
committed
cmd/compile: set base register of spill/restore to SP
Previously the base register was unset, which lead to the disassembler using "FP" instead of "SP" as the base register. That lead to some confusion as to what the difference betweeen the two was. Be consistent and always use SP. Fixes #19458 Change-Id: Ie8f8ee54653bd202c0cf6fbf1d350e3c8c8b67a0 Reviewed-on: https://go-review.googlesource.com/37971 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
1 parent 3a1271d commit 67d69f8

File tree

1 file changed

+1
-0
lines changed
  • src/cmd/compile/internal/gc

1 file changed

+1
-0
lines changed

src/cmd/compile/internal/gc/ssa.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4738,6 +4738,7 @@ func AddrAuto(a *obj.Addr, v *ssa.Value) {
47384738
a.Type = obj.TYPE_MEM
47394739
a.Node = n
47404740
a.Sym = Linksym(n.Sym)
4741+
a.Reg = int16(Thearch.REGSP)
47414742
a.Offset = n.Xoffset + off
47424743
if n.Class == PPARAM || n.Class == PPARAMOUT {
47434744
a.Name = obj.NAME_PARAM

0 commit comments

Comments
 (0)