The obj.Prog needs to be an obj.ARET rather than an obj.AJMP, otherwise the
epilogue does not get correctly produced.
Change-Id: Ie1262f2028d3b51720eeb0364a627fbde8b14df9
Reviewed-on: https://go-review.googlesource.com/c/go/+/221683
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
case ssa.BlockRet:
s.Prog(obj.ARET)
case ssa.BlockRetJmp:
- p := s.Prog(obj.AJMP)
+ p := s.Prog(obj.ARET)
p.To.Type = obj.TYPE_MEM
p.To.Name = obj.NAME_EXTERN
p.To.Sym = b.Aux.(*obj.LSym)