Skip to content

Commit

Permalink
cmd/internal/obj/x86: remove pointless NOPs
Browse files Browse the repository at this point in the history
They are no longer needed by stkcheck.

Fixes golang#16057

Change-Id: I57cb55de5b7a7a1d31a3da200a3a2d51576b68f5
  • Loading branch information
josharian committed Jun 16, 2016
1 parent ea2ac3f commit a0cd318
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/cmd/internal/obj/x86/obj6.go
Original file line number Diff line number Diff line change
Expand Up @@ -663,17 +663,6 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym) {
p.From.Type = obj.TYPE_CONST
p.From.Offset = int64(autoffset)
p.Spadj = autoffset
} else {
// zero-byte stack adjustment.
// Insert a fake non-zero adjustment so that stkcheck can
// recognize the end of the stack-splitting prolog.
p = obj.Appendp(ctxt, p)

p.As = obj.ANOP
p.Spadj = int32(-ctxt.Arch.PtrSize)
p = obj.Appendp(ctxt, p)
p.As = obj.ANOP
p.Spadj = int32(ctxt.Arch.PtrSize)
}

deltasp := autoffset
Expand Down

0 comments on commit a0cd318

Please sign in to comment.