From: Keith Randall Date: Thu, 9 Mar 2017 00:31:02 +0000 (-0800) Subject: cmd/compile: set base register of spill/restore to SP X-Git-Tag: go1.9beta1~1227 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=67d69f899ce0fcd3d7aee0a07554fb84770020c0;p=gostls13.git 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 TryBot-Result: Gobot Gobot Reviewed-by: Matthew Dempsky --- diff --git a/src/cmd/compile/internal/gc/ssa.go b/src/cmd/compile/internal/gc/ssa.go index 8d1ae97b86..6c442b4095 100644 --- a/src/cmd/compile/internal/gc/ssa.go +++ b/src/cmd/compile/internal/gc/ssa.go @@ -4738,6 +4738,7 @@ func AddrAuto(a *obj.Addr, v *ssa.Value) { a.Type = obj.TYPE_MEM a.Node = n a.Sym = Linksym(n.Sym) + a.Reg = int16(Thearch.REGSP) a.Offset = n.Xoffset + off if n.Class == PPARAM || n.Class == PPARAMOUT { a.Name = obj.NAME_PARAM