Commit 08dbd8ae authored by Russ Cox's avatar Russ Cox

Revert "cmd/internal/obj: fix pc/sp information for prologue"

This seems to have broken arm64 in a mysterious way. Will try again later.

This reverts commit 0a3c991f.

Change-Id: Ic1b53413c4168977a27381d9cc6fb8d9d7cbb780
Reviewed-on: https://go-review.googlesource.com/12245Reviewed-by: default avatarRuss Cox <rsc@golang.org>
parent 88fc3587
...@@ -804,12 +804,8 @@ func stacksplit(ctxt *obj.Link, p *obj.Prog, framesize int32) *obj.Prog { ...@@ -804,12 +804,8 @@ func stacksplit(ctxt *obj.Link, p *obj.Prog, framesize int32) *obj.Prog {
for last = ctxt.Cursym.Text; last.Link != nil; last = last.Link { 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 LR, R3
movw := obj.Appendp(ctxt, spfix) movw := obj.Appendp(ctxt, last)
movw.As = AMOVW movw.As = AMOVW
movw.From.Type = obj.TYPE_REG movw.From.Type = obj.TYPE_REG
movw.From.Reg = REGLINK movw.From.Reg = REGLINK
...@@ -837,10 +833,6 @@ func stacksplit(ctxt *obj.Link, p *obj.Prog, framesize int32) *obj.Prog { ...@@ -837,10 +833,6 @@ func stacksplit(ctxt *obj.Link, p *obj.Prog, framesize int32) *obj.Prog {
b.To.Type = obj.TYPE_BRANCH b.To.Type = obj.TYPE_BRANCH
b.Pcond = ctxt.Cursym.Text.Link b.Pcond = ctxt.Cursym.Text.Link
spfix = obj.Appendp(ctxt, b)
spfix.As = obj.ANOP
spfix.Spadj = +framesize
return bls return bls
} }
......
...@@ -161,12 +161,8 @@ func stacksplit(ctxt *obj.Link, p *obj.Prog, framesize int32) *obj.Prog { ...@@ -161,12 +161,8 @@ func stacksplit(ctxt *obj.Link, p *obj.Prog, framesize int32) *obj.Prog {
for last = ctxt.Cursym.Text; last.Link != nil; last = last.Link { 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 // MOV LR, R3
movlr := obj.Appendp(ctxt, spfix) movlr := obj.Appendp(ctxt, last)
movlr.As = AMOVD movlr.As = AMOVD
movlr.From.Type = obj.TYPE_REG movlr.From.Type = obj.TYPE_REG
movlr.From.Reg = REGLINK movlr.From.Reg = REGLINK
...@@ -206,10 +202,6 @@ func stacksplit(ctxt *obj.Link, p *obj.Prog, framesize int32) *obj.Prog { ...@@ -206,10 +202,6 @@ func stacksplit(ctxt *obj.Link, p *obj.Prog, framesize int32) *obj.Prog {
jmp.To.Type = obj.TYPE_BRANCH jmp.To.Type = obj.TYPE_BRANCH
jmp.Pcond = ctxt.Cursym.Text.Link jmp.Pcond = ctxt.Cursym.Text.Link
spfix = obj.Appendp(ctxt, jmp)
spfix.As = obj.ANOP
spfix.Spadj = +framesize
// placeholder for bls's jump target // placeholder for bls's jump target
// p = obj.Appendp(ctxt, p) // p = obj.Appendp(ctxt, p)
// p.As = obj.ANOP // p.As = obj.ANOP
......
...@@ -975,12 +975,7 @@ func stacksplit(ctxt *obj.Link, p *obj.Prog, framesize int32, textarg int32) *ob ...@@ -975,12 +975,7 @@ func stacksplit(ctxt *obj.Link, p *obj.Prog, framesize int32, textarg int32) *ob
for last = ctxt.Cursym.Text; last.Link != nil; last = last.Link { for last = ctxt.Cursym.Text; last.Link != nil; last = last.Link {
} }
// Explain to PC-line tables that there is no frame here. 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.Lineno = ctxt.Cursym.Text.Lineno
call.Mode = ctxt.Cursym.Text.Mode call.Mode = ctxt.Cursym.Text.Mode
call.As = obj.ACALL call.As = obj.ACALL
...@@ -999,10 +994,6 @@ func stacksplit(ctxt *obj.Link, p *obj.Prog, framesize int32, textarg int32) *ob ...@@ -999,10 +994,6 @@ func stacksplit(ctxt *obj.Link, p *obj.Prog, framesize int32, textarg int32) *ob
jmp.To.Type = obj.TYPE_BRANCH jmp.To.Type = obj.TYPE_BRANCH
jmp.Pcond = ctxt.Cursym.Text.Link jmp.Pcond = ctxt.Cursym.Text.Link
spfix = obj.Appendp(ctxt, jmp)
spfix.As = obj.ANOP
spfix.Spadj = +framesize
jls.Pcond = call jls.Pcond = call
if q1 != nil { if q1 != nil {
q1.Pcond = call q1.Pcond = call
......
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