Skip to content

Commit

Permalink
Revert "cmd/internal/obj: fix inline marker issue on s390x"
Browse files Browse the repository at this point in the history
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 <[email protected]>
Run-TryBot: Michael Munday <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
  • Loading branch information
aclements committed Aug 17, 2020
1 parent d19fedd commit a22ec6e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/cmd/internal/obj/pcln.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
11 changes: 11 additions & 0 deletions src/cmd/internal/obj/s390x/objz.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a22ec6e

Please sign in to comment.