You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cmd/internal/obj/x86/obj6.go contains this comment and code for when a function requires no stack space:
ifautoffset!=0 {
// requires stack space...
} 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.ANOPp.Spadj=int32(-ctxt.Arch.PtrSize)
p=obj.Appendp(ctxt, p)
p.As=obj.ANOPp.Spadj=int32(ctxt.Arch.PtrSize)
}
Looking through stkcheck, I don't see where/how this matters. If you remove the else branch, all.bash still passes. Do we still need to insert these NOPs?
This must be cruft from before instruction selection was done in the compiler, the ANOPs translate to nothing at all in the machine code so there's nothing for stkcheck to find. Delete it! (in 1.8)
cmd/internal/obj/x86/obj6.go contains this comment and code for when a function requires no stack space:
Looking through stkcheck, I don't see where/how this matters. If you remove the else branch, all.bash still passes. Do we still need to insert these NOPs?
@randall77 @mwhudson @rsc
The text was updated successfully, but these errors were encountered: