Commit 67d69f89 authored by Keith Randall's avatar Keith Randall

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: default avatarMatthew Dempsky <mdempsky@google.com>
parent 3a1271da
...@@ -4738,6 +4738,7 @@ func AddrAuto(a *obj.Addr, v *ssa.Value) { ...@@ -4738,6 +4738,7 @@ func AddrAuto(a *obj.Addr, v *ssa.Value) {
a.Type = obj.TYPE_MEM a.Type = obj.TYPE_MEM
a.Node = n a.Node = n
a.Sym = Linksym(n.Sym) a.Sym = Linksym(n.Sym)
a.Reg = int16(Thearch.REGSP)
a.Offset = n.Xoffset + off a.Offset = n.Xoffset + off
if n.Class == PPARAM || n.Class == PPARAMOUT { if n.Class == PPARAM || n.Class == PPARAMOUT {
a.Name = obj.NAME_PARAM a.Name = obj.NAME_PARAM
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment