1
0
mirror of https://github.com/golang/go synced 2024-11-19 16:54:44 -07:00

runtime: fix solaris build, part 2

This file was already assigned to another CL
so it didn't make it into the build fix CL. Sigh.

TBR=iant
CC=golang-codereviews
https://golang.org/cl/144850043
This commit is contained in:
Russ Cox 2014-09-14 22:24:29 -04:00
parent 6c59cdcf34
commit e8a74dcad9

View File

@ -31,9 +31,10 @@ var asmsysvicall6 libcFunc
//go:nosplit
func sysvicall0(fn *libcFunc) uintptr {
libcall := &getg().m.libcall
libcall.fn = unsafe.Pointer(fn)
libcall.fn = uintptr(unsafe.Pointer(fn))
libcall.n = 0
libcall.args = unsafe.Pointer(fn) // it's unused but must be non-nil, otherwise crashes
// TODO(rsc): Why is noescape necessary here and below?
libcall.args = uintptr(noescape(unsafe.Pointer(&fn))) // it's unused but must be non-nil, otherwise crashes
asmcgocall(unsafe.Pointer(&asmsysvicall6), unsafe.Pointer(libcall))
return libcall.r1
}
@ -41,9 +42,9 @@ func sysvicall0(fn *libcFunc) uintptr {
//go:nosplit
func sysvicall1(fn *libcFunc, a1 uintptr) uintptr {
libcall := &getg().m.libcall
libcall.fn = unsafe.Pointer(fn)
libcall.fn = uintptr(unsafe.Pointer(fn))
libcall.n = 1
libcall.args = noescape(unsafe.Pointer(&a1))
libcall.args = uintptr(noescape(unsafe.Pointer(&a1)))
asmcgocall(unsafe.Pointer(&asmsysvicall6), unsafe.Pointer(libcall))
return libcall.r1
}
@ -51,9 +52,9 @@ func sysvicall1(fn *libcFunc, a1 uintptr) uintptr {
//go:nosplit
func sysvicall2(fn *libcFunc, a1, a2 uintptr) uintptr {
libcall := &getg().m.libcall
libcall.fn = unsafe.Pointer(fn)
libcall.fn = uintptr(unsafe.Pointer(fn))
libcall.n = 2
libcall.args = noescape(unsafe.Pointer(&a1))
libcall.args = uintptr(noescape(unsafe.Pointer(&a1)))
asmcgocall(unsafe.Pointer(&asmsysvicall6), unsafe.Pointer(libcall))
return libcall.r1
}
@ -61,9 +62,9 @@ func sysvicall2(fn *libcFunc, a1, a2 uintptr) uintptr {
//go:nosplit
func sysvicall3(fn *libcFunc, a1, a2, a3 uintptr) uintptr {
libcall := &getg().m.libcall
libcall.fn = unsafe.Pointer(fn)
libcall.fn = uintptr(unsafe.Pointer(fn))
libcall.n = 3
libcall.args = noescape(unsafe.Pointer(&a1))
libcall.args = uintptr(noescape(unsafe.Pointer(&a1)))
asmcgocall(unsafe.Pointer(&asmsysvicall6), unsafe.Pointer(libcall))
return libcall.r1
}
@ -71,9 +72,9 @@ func sysvicall3(fn *libcFunc, a1, a2, a3 uintptr) uintptr {
//go:nosplit
func sysvicall4(fn *libcFunc, a1, a2, a3, a4 uintptr) uintptr {
libcall := &getg().m.libcall
libcall.fn = unsafe.Pointer(fn)
libcall.fn = uintptr(unsafe.Pointer(fn))
libcall.n = 4
libcall.args = noescape(unsafe.Pointer(&a1))
libcall.args = uintptr(noescape(unsafe.Pointer(&a1)))
asmcgocall(unsafe.Pointer(&asmsysvicall6), unsafe.Pointer(libcall))
return libcall.r1
}
@ -81,9 +82,9 @@ func sysvicall4(fn *libcFunc, a1, a2, a3, a4 uintptr) uintptr {
//go:nosplit
func sysvicall5(fn *libcFunc, a1, a2, a3, a4, a5 uintptr) uintptr {
libcall := &getg().m.libcall
libcall.fn = unsafe.Pointer(fn)
libcall.fn = uintptr(unsafe.Pointer(fn))
libcall.n = 5
libcall.args = noescape(unsafe.Pointer(&a1))
libcall.args = uintptr(noescape(unsafe.Pointer(&a1)))
asmcgocall(unsafe.Pointer(&asmsysvicall6), unsafe.Pointer(libcall))
return libcall.r1
}
@ -91,9 +92,9 @@ func sysvicall5(fn *libcFunc, a1, a2, a3, a4, a5 uintptr) uintptr {
//go:nosplit
func sysvicall6(fn *libcFunc, a1, a2, a3, a4, a5, a6 uintptr) uintptr {
libcall := &getg().m.libcall
libcall.fn = unsafe.Pointer(fn)
libcall.fn = uintptr(unsafe.Pointer(fn))
libcall.n = 6
libcall.args = noescape(unsafe.Pointer(&a1))
libcall.args = uintptr(noescape(unsafe.Pointer(&a1)))
asmcgocall(unsafe.Pointer(&asmsysvicall6), unsafe.Pointer(libcall))
return libcall.r1
}