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 #16057

Change-Id: I57cb55de5b7a7a1d31a3da200a3a2d51576b68f5
Reviewed-on: https://go-review.googlesource.com/26667
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
  • Loading branch information
josharian committed Aug 25, 2016
1 parent ef694a0 commit 64e1529
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 @@ -686,17 +686,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 64e1529

Please sign in to comment.