mirror of
https://github.com/golang/go
synced 2024-11-23 10:40:08 -07:00
cmd/internal/obj: fix PCSP table at runtime.morestack calls
Fixes #13346. Change-Id: Ic903ee90575e8dbe23905d0678d3295745d1d47f Reviewed-on: https://go-review.googlesource.com/18154 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
parent
b80ea53200
commit
66f1f89dc0
@ -803,8 +803,12 @@ func stacksplit(ctxt *obj.Link, p *obj.Prog, framesize int32) *obj.Prog {
|
||||
for last = ctxt.Cursym.Text; last.Link != nil; last = last.Link {
|
||||
}
|
||||
|
||||
spfix := obj.Appendp(ctxt, last)
|
||||
spfix.As = obj.ANOP
|
||||
spfix.Spadj = -framesize
|
||||
|
||||
// MOVW LR, R3
|
||||
movw := obj.Appendp(ctxt, last)
|
||||
movw := obj.Appendp(ctxt, spfix)
|
||||
movw.As = AMOVW
|
||||
movw.From.Type = obj.TYPE_REG
|
||||
movw.From.Reg = REGLINK
|
||||
@ -831,6 +835,7 @@ func stacksplit(ctxt *obj.Link, p *obj.Prog, framesize int32) *obj.Prog {
|
||||
b.As = obj.AJMP
|
||||
b.To.Type = obj.TYPE_BRANCH
|
||||
b.Pcond = ctxt.Cursym.Text.Link
|
||||
b.Spadj = +framesize
|
||||
|
||||
return bls
|
||||
}
|
||||
|
@ -161,8 +161,12 @@ func stacksplit(ctxt *obj.Link, p *obj.Prog, framesize int32) *obj.Prog {
|
||||
for last = ctxt.Cursym.Text; last.Link != nil; last = last.Link {
|
||||
}
|
||||
|
||||
spfix := obj.Appendp(ctxt, last)
|
||||
spfix.As = obj.ANOP
|
||||
spfix.Spadj = -framesize
|
||||
|
||||
// MOV LR, R3
|
||||
movlr := obj.Appendp(ctxt, last)
|
||||
movlr := obj.Appendp(ctxt, spfix)
|
||||
movlr.As = AMOVD
|
||||
movlr.From.Type = obj.TYPE_REG
|
||||
movlr.From.Reg = REGLINK
|
||||
@ -201,6 +205,7 @@ func stacksplit(ctxt *obj.Link, p *obj.Prog, framesize int32) *obj.Prog {
|
||||
jmp.As = AB
|
||||
jmp.To.Type = obj.TYPE_BRANCH
|
||||
jmp.Pcond = ctxt.Cursym.Text.Link
|
||||
jmp.Spadj = +framesize
|
||||
|
||||
// placeholder for bls's jump target
|
||||
// p = obj.Appendp(ctxt, p)
|
||||
|
@ -1080,7 +1080,11 @@ func stacksplit(ctxt *obj.Link, p *obj.Prog, framesize int32, textarg int32) *ob
|
||||
for last = ctxt.Cursym.Text; last.Link != nil; last = last.Link {
|
||||
}
|
||||
|
||||
call := obj.Appendp(ctxt, last)
|
||||
spfix := obj.Appendp(ctxt, last)
|
||||
spfix.As = obj.ANOP
|
||||
spfix.Spadj = -framesize
|
||||
|
||||
call := obj.Appendp(ctxt, spfix)
|
||||
call.Lineno = ctxt.Cursym.Text.Lineno
|
||||
call.Mode = ctxt.Cursym.Text.Mode
|
||||
call.As = obj.ACALL
|
||||
@ -1098,6 +1102,7 @@ func stacksplit(ctxt *obj.Link, p *obj.Prog, framesize int32, textarg int32) *ob
|
||||
jmp.As = obj.AJMP
|
||||
jmp.To.Type = obj.TYPE_BRANCH
|
||||
jmp.Pcond = ctxt.Cursym.Text.Link
|
||||
jmp.Spadj = +framesize
|
||||
|
||||
jls.Pcond = call
|
||||
if q1 != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user