...

Source file src/runtime/sys_x86.go

Documentation: runtime

		 1  // Copyright 2013 The Go Authors. All rights reserved.
		 2  // Use of this source code is governed by a BSD-style
		 3  // license that can be found in the LICENSE file.
		 4  
		 5  //go:build amd64 || 386
		 6  // +build amd64 386
		 7  
		 8  package runtime
		 9  
		10  import (
		11  	"runtime/internal/sys"
		12  	"unsafe"
		13  )
		14  
		15  // adjust Gobuf as if it executed a call to fn with context ctxt
		16  // and then stopped before the first instruction in fn.
		17  func gostartcall(buf *gobuf, fn, ctxt unsafe.Pointer) {
		18  	sp := buf.sp
		19  	sp -= sys.PtrSize
		20  	*(*uintptr)(unsafe.Pointer(sp)) = buf.pc
		21  	buf.sp = sp
		22  	buf.pc = uintptr(fn)
		23  	buf.ctxt = ctxt
		24  }
		25  

View as plain text