Commit 64e15291 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

cmd/internal/obj/x86: remove pointless NOPs

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: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: default avatarMichael Hudson-Doyle <michael.hudson@canonical.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent ef694a01
...@@ -686,17 +686,6 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym) { ...@@ -686,17 +686,6 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym) {
p.From.Type = obj.TYPE_CONST p.From.Type = obj.TYPE_CONST
p.From.Offset = int64(autoffset) p.From.Offset = int64(autoffset)
p.Spadj = 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 deltasp := autoffset
......
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