mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: mark freedefer and deferclass go:nosplit
This should make deferreturn nosplit all the way down, which should fix the current windows/amd64 failure. If not, I will change StackCopyAlways back to 0. TBR=khr CC=golang-codereviews https://golang.org/cl/135600043
This commit is contained in:
parent
dc089574c4
commit
857d55a3f9
1 changed files with 2 additions and 0 deletions
|
|
@ -95,6 +95,7 @@ func deferproc(siz int32, fn *funcval) { // arguments of fn follow fn
|
||||||
// This maps exactly to malloc size classes.
|
// This maps exactly to malloc size classes.
|
||||||
|
|
||||||
// defer size class for arg size sz
|
// defer size class for arg size sz
|
||||||
|
//go:nosplit
|
||||||
func deferclass(siz uintptr) uintptr {
|
func deferclass(siz uintptr) uintptr {
|
||||||
return (siz + 7) >> 4
|
return (siz + 7) >> 4
|
||||||
}
|
}
|
||||||
|
|
@ -159,6 +160,7 @@ func newdefer(siz int32) *_defer {
|
||||||
|
|
||||||
// Free the given defer.
|
// Free the given defer.
|
||||||
// The defer cannot be used after this call.
|
// The defer cannot be used after this call.
|
||||||
|
//go:nosplit
|
||||||
func freedefer(d *_defer) {
|
func freedefer(d *_defer) {
|
||||||
if d.special {
|
if d.special {
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue