mirror of https://github.com/golang/go.git
Revert "cmd/internal/obj: fix inline marker issue on s390x"
This reverts CL 247697. Reason for revert: This change broke the linux-arm builder. Change-Id: I8ca0d5b3b2ea0109ffbfadeab1406a1b60e7d18d Reviewed-on: https://go-review.googlesource.com/c/go/+/248718 Reviewed-by: Michael Munday <mike.munday@ibm.com> Run-TryBot: Michael Munday <mike.munday@ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
d19fedd180
commit
a22ec6e650
|
|
@ -278,21 +278,6 @@ func linkpcln(ctxt *Link, cursym *LSym) {
|
|||
funcpctab(ctxt, &pcln.Pcfile, cursym, "pctofile", pctofileline, pcln)
|
||||
funcpctab(ctxt, &pcln.Pcline, cursym, "pctoline", pctofileline, nil)
|
||||
|
||||
// Check that all the Progs used as inline markers are still reachable.
|
||||
// See issue #40473.
|
||||
inlMarkProgs := make(map[*Prog]struct{}, len(cursym.Func.InlMarks))
|
||||
for _, inlMark := range cursym.Func.InlMarks {
|
||||
inlMarkProgs[inlMark.p] = struct{}{}
|
||||
}
|
||||
for p := cursym.Func.Text; p != nil; p = p.Link {
|
||||
if _, ok := inlMarkProgs[p]; ok {
|
||||
delete(inlMarkProgs, p)
|
||||
}
|
||||
}
|
||||
if len(inlMarkProgs) > 0 {
|
||||
ctxt.Diag("one or more instructions used as inline markers are no longer reachable")
|
||||
}
|
||||
|
||||
pcinlineState := new(pcinlineState)
|
||||
funcpctab(ctxt, &pcln.Pcinline, cursym, "pctoinline", pcinlineState.pctoinline, nil)
|
||||
for _, inlMark := range cursym.Func.InlMarks {
|
||||
|
|
|
|||
|
|
@ -283,6 +283,17 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym, newprog obj.ProgAlloc) {
|
|||
ACMPUBNE:
|
||||
q = p
|
||||
p.Mark |= BRANCH
|
||||
if p.Pcond != nil {
|
||||
q := p.Pcond
|
||||
for q.As == obj.ANOP {
|
||||
q = q.Link
|
||||
p.Pcond = q
|
||||
}
|
||||
}
|
||||
|
||||
case obj.ANOP:
|
||||
q.Link = p.Link /* q is non-nop */
|
||||
p.Link.Mark |= p.Mark
|
||||
|
||||
default:
|
||||
q = p
|
||||
|
|
|
|||
Loading…
Reference in New Issue